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

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

Issue 2511333002: Cleanup after enabling WPTServe. (Closed)
Patch Set: Update a comment, remove the right testharnessreport.js 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 | « no previous file | third_party/WebKit/LayoutTests/PRESUBMIT.py » ('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..2fae9f4272effa19482969f8e4d59cd8870bade6 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.cc
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc
@@ -218,12 +218,15 @@ class MockAudioCapturerSource : public media::AudioCapturerSource {
~MockAudioCapturerSource() override {}
};
-// Tests in web-platform-tests use absolute path links such as
+// Tests in csswg-test use absolute path links such as
// <script src="/resources/testharness.js">.
// Because we load the tests as local files, such links don't work.
// This function fixes this issue by rewriting file: URLs which were produced
-// from such links so that they point actual files in wpt/.
-WebURL RewriteAbsolutePathInWPT(const std::string& utf8_url) {
+// from such links so that they point actual files in LayoutTests/resources/.
+//
+// Note that this isn't applied to external/wpt because tests in external/wpt
+// are accessed via http.
+WebURL RewriteAbsolutePathInCsswgTest(const std::string& utf8_url) {
const char kFileScheme[] = "file:///";
const int kFileSchemeLen = arraysize(kFileScheme) - 1;
if (utf8_url.compare(0, kFileSchemeLen, kFileScheme, kFileSchemeLen) != 0)
@@ -242,7 +245,7 @@ WebURL RewriteAbsolutePathInWPT(const std::string& utf8_url) {
base::FilePath new_path =
LayoutTestRenderThreadObserver::GetInstance()
->webkit_source_dir()
- .Append(FILE_PATH_LITERAL("LayoutTests/external/wpt/"))
+ .Append(FILE_PATH_LITERAL("LayoutTests/"))
.AppendASCII(path);
return WebURL(net::FilePathToFileURL(new_path));
}
@@ -355,7 +358,7 @@ WebURL BlinkTestRunner::LocalFileToDataURL(const WebURL& file_url) {
WebURL BlinkTestRunner::RewriteLayoutTestsURL(const std::string& utf8_url,
bool is_wpt_mode) {
if (is_wpt_mode) {
- WebURL rewritten_url = RewriteAbsolutePathInWPT(utf8_url);
+ WebURL rewritten_url = RewriteAbsolutePathInCsswgTest(utf8_url);
if (!rewritten_url.isEmpty())
return rewritten_url;
return WebURL(GURL(utf8_url));
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/PRESUBMIT.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698