From 0c5f2224e5533fbfc9a3d41ea1708e3750e641fe Mon Sep 17 00:00:00 2001
From: "jochen@chromium.org"
 <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Wed, 20 Feb 2013 11:26:19 +0000
Subject: [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
---
 content/shell/shell_browser_main.cc | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'content/shell/shell_browser_main.cc')

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();
-- 
cgit v1.1