summaryrefslogtreecommitdiffstats
path: root/content/shell
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-15 09:34:01 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-15 09:34:01 +0000
commit7a37114bbf55ce61b305f675d78ea4a0794ca96b (patch)
tree000ae4a9e606b4211ec16e7e6c405d36b507de7f /content/shell
parentfbddbe935e2052270f92da1a4b32ea74b869f238 (diff)
downloadchromium_src-7a37114bbf55ce61b305f675d78ea4a0794ca96b.zip
chromium_src-7a37114bbf55ce61b305f675d78ea4a0794ca96b.tar.gz
chromium_src-7a37114bbf55ce61b305f675d78ea4a0794ca96b.tar.bz2
Compile fix for windows after r161839
BUG=111316 TBR=marja Review URL: https://codereview.chromium.org/11140022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161840 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r--content/shell/shell_browser_main.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/content/shell/shell_browser_main.cc b/content/shell/shell_browser_main.cc
index 9706e86..bf33753 100644
--- a/content/shell/shell_browser_main.cc
+++ b/content/shell/shell_browser_main.cc
@@ -11,6 +11,7 @@
#include "base/file_util.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "base/sys_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "content/public/browser/browser_main_runner.h"
#include "content/shell/shell_switches.h"
@@ -44,8 +45,15 @@ 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()))
+ if (!(test_url.is_valid() && test_url.has_scheme())) {
+#if defined(OS_WIN)
+ std::wstring wide_path_or_url =
+ base::SysNativeMBToWide(path_or_url);
test_url = net::FilePathToFileURL(FilePath(path_or_url));
+#else
+ test_url = net::FilePathToFileURL(FilePath(path_or_url));
+#endif
+ }
FilePath local_path;
if (net::FileURLToFilePath(test_url, &local_path)) {
// We're outside of the message loop here, and this is a test.