Index: content/shell/shell_browser_main.cc |
diff --git a/content/shell/shell_browser_main.cc b/content/shell/shell_browser_main.cc |
index 9706e86050add8c94608976176d89a9ecbad20fe..bf33753804b1b7a80bcff93f2a8a7c8a56d052ab 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. |