diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-15 10:01:48 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-15 10:01:48 +0000 |
commit | 4d48603926845950ab46173aeaf963061a887efb (patch) | |
tree | 18712111c03f51e5a7df262cb82bc75e1464ff0f /content/shell | |
parent | cd28418f5c452ceaa94d7b546f1a4a5c64ca3ba7 (diff) | |
download | chromium_src-4d48603926845950ab46173aeaf963061a887efb.zip chromium_src-4d48603926845950ab46173aeaf963061a887efb.tar.gz chromium_src-4d48603926845950ab46173aeaf963061a887efb.tar.bz2 |
Revert 161839 - [content shell] don't use webkit_support functions to manipulate URLs
In single-process mode, WebKit isn't yet initialized before we start a renderer,
so we can't pass around WebURLs
BUG=111316
TEST=content_shell --dump-render-tree --single-process doesn't crash
Review URL: https://codereview.chromium.org/11151007
TBR=jochen@chromium.org
Review URL: https://codereview.chromium.org/11143013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161844 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r-- | content/shell/shell_browser_main.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/content/shell/shell_browser_main.cc b/content/shell/shell_browser_main.cc index 9706e86..a19005d 100644 --- a/content/shell/shell_browser_main.cc +++ b/content/shell/shell_browser_main.cc @@ -7,15 +7,12 @@ #include <iostream> #include "base/command_line.h" -#include "base/file_path.h" -#include "base/file_util.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/threading/thread_restrictions.h" #include "content/public/browser/browser_main_runner.h" #include "content/shell/shell_switches.h" #include "content/shell/webkit_test_runner_host.h" -#include "net/base/net_util.h" #include "webkit/support/webkit_support.h" namespace { @@ -43,14 +40,11 @@ GURL GetURLForLayoutTest(const char* test_name, } if (expected_pixel_hash) *expected_pixel_hash = pixel_hash; - GURL test_url(path_or_url); - if (!(test_url.is_valid() && test_url.has_scheme())) - test_url = net::FilePathToFileURL(FilePath(path_or_url)); - FilePath local_path; - if (net::FileURLToFilePath(test_url, &local_path)) { + GURL test_url = webkit_support::CreateURLForPathOrURL(path_or_url); + { // We're outside of the message loop here, and this is a test. base::ThreadRestrictions::ScopedAllowIO allow_io; - file_util::SetCurrentDirectory(local_path.DirName()); + webkit_support::SetCurrentDirectoryForFileURL(test_url); } return test_url; } |