summaryrefslogtreecommitdiffstats
path: root/content/shell/shell_browser_main.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-20 11:26:19 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-20 11:26:19 +0000
commit0c5f2224e5533fbfc9a3d41ea1708e3750e641fe (patch)
treec385b806c9a85a99d6aabce578fdd0c0694273ab /content/shell/shell_browser_main.cc
parent79129b100f15da04f5daed58b60017879c123a2f (diff)
downloadchromium_src-0c5f2224e5533fbfc9a3d41ea1708e3750e641fe.zip
chromium_src-0c5f2224e5533fbfc9a3d41ea1708e3750e641fe.tar.gz
chromium_src-0c5f2224e5533fbfc9a3d41ea1708e3750e641fe.tar.bz2
[content shell] implement pathToLocalResource
On windows, this method replaces a /tmp/ prefix with the actual temp path. Otherwise, it removes superfluous leading slashes from file: URLs and passes the path on the rewriteLayoutTestURL BUG=111316 R=thakis@chromium.org TEST=http/tests/plugins/post-url-file.html passes Review URL: https://chromiumcodereview.appspot.com/12282041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183473 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/shell_browser_main.cc')
-rw-r--r--content/shell/shell_browser_main.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/content/shell/shell_browser_main.cc b/content/shell/shell_browser_main.cc
index cffd464..182f7a2 100644
--- a/content/shell/shell_browser_main.cc
+++ b/content/shell/shell_browser_main.cc
@@ -123,6 +123,13 @@ int ShellBrowserMain(const content::MainFunctionParams& parameters) {
if (layout_test_mode) {
content::WebKitTestController test_controller;
+ {
+ // We're outside of the message loop here, and this is a test.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ base::FilePath temp_path;
+ file_util::GetTempDir(&temp_path);
+ test_controller.SetTempPath(temp_path);
+ }
std::string test_string;
CommandLine::StringVector args =
CommandLine::ForCurrentProcess()->GetArgs();