Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2249)

Unified Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 2648433008: Use explicit WebString conversions in LayoutTest related files (Closed)
Patch Set: . Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/layout_test/blink_test_runner.cc
diff --git a/content/shell/renderer/layout_test/blink_test_runner.cc b/content/shell/renderer/layout_test/blink_test_runner.cc
index adee3a939ca936178f05ad598e6f7abff7e8e23b..c9f688100e148b67c33952657cfe794a73755b1e 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.cc
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc
@@ -333,7 +333,7 @@ WebString BlinkTestRunner::GetAbsoluteWebStringFromUTF8Path(
FILE_PATH_LITERAL("foo")));
net::FileURLToFilePath(base_url.Resolve(utf8_path), &path);
}
- return path.AsUTF16Unsafe();
+ return blink::FilePathToWebString(path);
}
WebURL BlinkTestRunner::LocalFileToDataURL(const WebURL& file_url) {
@@ -370,12 +370,7 @@ WebURL BlinkTestRunner::RewriteLayoutTestsURL(const std::string& utf8_url,
base::FilePath replace_path =
LayoutTestRenderThreadObserver::GetInstance()->webkit_source_dir()
.Append(FILE_PATH_LITERAL("LayoutTests/"));
-#if defined(OS_WIN)
- std::string utf8_path = base::WideToUTF8(replace_path.value());
-#else
- std::string utf8_path =
- base::WideToUTF8(base::SysNativeMBToWide(replace_path.value()));
-#endif
+ std::string utf8_path = replace_path.AsUTF8Unsafe();
std::string new_url =
std::string("file://") + utf8_path + utf8_url.substr(kPrefixLen);
return WebURL(GURL(new_url));
« no previous file with comments | « content/public/test/render_view_test.cc ('k') | content/test/layouttest_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698