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

Unified Diff: third_party/WebKit/LayoutTests/resources/testharnessreport.js

Issue 1994683004: Add web platform pointerevents tests to Layouttest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: third_party/WebKit/LayoutTests/resources/testharnessreport.js
diff --git a/third_party/WebKit/LayoutTests/resources/testharnessreport.js b/third_party/WebKit/LayoutTests/resources/testharnessreport.js
index 1cd3133e1eaa9f2ec698fad997f8dddc3ddb40f3..759db99aa9f50608153020e30132345cddf13814 100644
--- a/third_party/WebKit/LayoutTests/resources/testharnessreport.js
+++ b/third_party/WebKit/LayoutTests/resources/testharnessreport.js
@@ -66,10 +66,24 @@
return !!document.querySelector('script[src*="/resources/testharness"]');
}
+ function injectSyntheticInput() {
+ var path = window.location.pathname;
+ if (path.match(/imported\/wpt\/.*\.html$/)) {
+ path = path.replace(/imported\/wpt\/(.*)\.html$/, "imported/wpt_automation/$1-input.js");
+ var input_script = document.createElement('script');
+ input_script.setAttribute('src', path);
+ document.head.appendChild(input_script);
+ }
+ }
+
var didDispatchLoadEvent = false;
var handleLoad = function() {
didDispatchLoadEvent = true;
window.removeEventListener('load', handleLoad);
+ // Add synthetic input to pointer event manual tests
+ if(window.location.pathname.includes('imported/wpt/pointerevents/')) {
+ setTimeout(injectSyntheticInput, 0);
+ }
};
window.addEventListener('load', handleLoad, false);

Powered by Google App Engine
This is Rietveld 408576698