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

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

Issue 2013203003: content_shell: Update absolute path rewriting logic again. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comments Created 4 years, 7 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/shell/renderer/layout_test/blink_test_runner.h ('k') | no next file » | 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 f5aae4f81de2295e5ffd14ce323c5ad10d8835b0..8d8e9aa0ead3035e31d23a8882ed5bab6a06e2c3 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.cc
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc
@@ -351,10 +351,14 @@ WebURL BlinkTestRunner::LocalFileToDataURL(const WebURL& file_url) {
return WebURL(GURL(data_url_prefix + contents_base64));
}
-WebURL BlinkTestRunner::RewriteLayoutTestsURL(const std::string& utf8_url) {
- WebURL rewritten_url = RewriteAbsolutePathInWPT(utf8_url);
- if (!rewritten_url.isEmpty())
- return rewritten_url;
+WebURL BlinkTestRunner::RewriteLayoutTestsURL(const std::string& utf8_url,
+ bool is_wpt_mode) {
+ if (is_wpt_mode) {
+ WebURL rewritten_url = RewriteAbsolutePathInWPT(utf8_url);
+ if (!rewritten_url.isEmpty())
+ return rewritten_url;
+ return WebURL(GURL(utf8_url));
+ }
const char kPrefix[] = "file:///tmp/LayoutTests/";
const int kPrefixLen = arraysize(kPrefix) - 1;
@@ -549,7 +553,7 @@ std::string BlinkTestRunner::PathToLocalResource(const std::string& resource) {
result = result.substr(0, strlen("file:///")) +
result.substr(strlen("file:////"));
}
- return RewriteLayoutTestsURL(result).string().utf8();
+ return RewriteLayoutTestsURL(result, false /* is_wpt_mode */).string().utf8();
}
void BlinkTestRunner::SetLocale(const std::string& locale) {
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698