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

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: 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
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..81d46e0b8f55854f81d7ac51fce8b5fb42fbef7d 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).string().utf8();
kinuko 2016/05/27 03:35:57 nit: can we add a comment like /* is_wpt_mode */ a
tkent 2016/05/27 03:43:03 Done.
}
void BlinkTestRunner::SetLocale(const std::string& locale) {

Powered by Google App Engine
This is Rietveld 408576698