Commit 6f5f9c29 authored by Nicolas Pena's avatar Nicolas Pena Committed by Commit Bot

Move EventTiming tests to WPT Try 3

This CL moves the tests in http/tests/event-timing to external/wpt/event-timing.
The slow image is change from php based to python based. The click is now
handled by test driver. and setTimeout is replaced with step_timeout.

Bug: 841224, 908187, 907948, 907949
Change-Id: Ia6359878666cfb96645aa3b7cd7736ce9df97683
Reviewed-on: https://chromium-review.googlesource.com/c/1352617Reviewed-by: default avatarTimothy Dresser <tdresser@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612214}
parent 7d81ddd9
......@@ -115,7 +115,7 @@ crbug.com/813547 [ Linux ] webaudio/BiquadFilter/tail-time-lowpass.html [ Pass F
crbug.com/856601 [ Linux ] fast/css/visited-link-hang.html [ Pass Timeout ]
crbug.com/856601 [ Linux ] http/tests/devtools/elements/styles-4/styles-inline-element-style-changes-should-not-force-style-recalc.js [ Pass Timeout ]
crbug.com/856601 [ Linux ] http/tests/event-timing/event-timing-retrievability.html [ Pass Timeout ]
crbug.com/856601 [ Linux ] external/wpt/event-timing/event-timing-retrievability.html [ Pass Timeout ]
# Slow idlharness.js tests on MSAN
crbug.com/856601 [ Linux ] external/wpt/BackgroundSync/interfaces.https.any.html [ Timeout Pass ]
......
......@@ -904,13 +904,13 @@ crbug.com/874695 http/tests/devtools/sources/debugger/live-edit-no-reveal.js [ S
crbug.com/874695 http/tests/devtools/tracing/decode-resize.js [ Slow ]
crbug.com/874695 http/tests/devtools/tracing/timeline-paint/paint-profiler-update.js [ Slow ]
crbug.com/874695 http/tests/devtools/tracing/timeline-style/timeline-style-recalc-all-invalidator-types.js [ Slow ]
crbug.com/874695 http/tests/event-timing/event-timing-bufferbeforeonload.html [ Slow ]
crbug.com/874695 http/tests/event-timing/event-timing-crossiframe.html [ Slow ]
crbug.com/874695 http/tests/event-timing/event-timing-observethenonload.html [ Slow ]
crbug.com/874695 http/tests/event-timing/event-timing-onloadthenobserve-firstInput.html [ Slow ]
crbug.com/874695 http/tests/event-timing/event-timing-onloadthenobserve.html [ Slow ]
crbug.com/874695 http/tests/event-timing/event-timing-retrievability.html [ Slow ]
crbug.com/874695 http/tests/event-timing/event-timing-timingconditions.html [ Slow ]
crbug.com/874695 external/wpt/event-timing/event-timing-bufferbeforeonload.html [ Slow ]
crbug.com/874695 external/wpt/event-timing/event-timing-crossiframe.html [ Slow ]
crbug.com/874695 external/wpt/event-timing/event-timing-observethenonload.html [ Slow ]
crbug.com/874695 external/wpt/event-timing/event-timing-onloadthenobserve-firstInput.html [ Slow ]
crbug.com/874695 external/wpt/event-timing/event-timing-onloadthenobserve.html [ Slow ]
crbug.com/874695 external/wpt/event-timing/event-timing-retrievability.html [ Slow ]
crbug.com/874695 external/wpt/event-timing/event-timing-timingconditions.html [ Slow ]
crbug.com/874695 http/tests/fetch/serviceworker/body-mixin-base-https-other-https.html [ Slow ]
crbug.com/874695 http/tests/fetch/serviceworker-proxied/thorough/access-control-base-https-other-https.html [ Slow ]
crbug.com/874695 http/tests/fetch/serviceworker-proxied/thorough/auth-base-https-other-https.html [ Slow ]
......
......@@ -2783,8 +2783,8 @@ crbug.com/763830 http/tests/security/cors-rfc1918/ [ Skip ]
crbug.com/763830 virtual/outofblink-cors/http/tests/security/cors-rfc1918/ [ Skip ]
crbug.com/763830 virtual/outofblink-cors-ns/http/tests/security/cors-rfc1918/ [ Skip ]
crbug.com/831729 http/tests/event-timing/event-timing-crossiframe.html [ Timeout ]
crbug.com/831729 http/tests/event-timing/event-timing-observer-manual.html [ Skip ]
crbug.com/831729 external/wpt/event-timing/event-timing-crossiframe.html [ Timeout ]
crbug.com/831729 external/wpt/event-timing/event-timing-observer-manual.html [ Skip ]
# Working on getting the CSP tests going:
crbug.com/694525 external/wpt/content-security-policy/connect-src/worker-from-guid.sub.html [ Skip ]
......
......@@ -5,8 +5,11 @@
<button id='button' onclick='clickDelay()'>Generate a 'click' event</button>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-support.js></script>
<img src=resources/slow-image.php>
<img src=resources/slow-image.py>
<script>
let clickTimeMin;
......
......@@ -10,8 +10,11 @@
<button id='button' onclick='1'>Generate a 'click' event</button>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-support.js></script>
<img src=./resources/slow-image.php>
<img src=./resources/slow-image.py>
<iframe src=resources/event-timing-crossiframe-childframe.html></iframe>
<script>
let clickTimeMin;
......
......@@ -53,7 +53,7 @@
function onMakeBusy() {
log("busy start");
setTimeout(()=>{
step_timeout(()=>{
mainThreadBusy(2000);
log("busy end");
}, 0);
......
......@@ -6,8 +6,11 @@
<button id='button' onclick='1'>Generate a 'click' event</button>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-support.js></script>
<img src=resources/slow-image.php>
<img src=resources/slow-image.py>
<script>
let timeBeforeFirstClick;
......
......@@ -5,6 +5,9 @@
<button id='button' onclick='1'>Generate a 'click' event</button>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-support.js></script>
<script>
......
......@@ -7,6 +7,9 @@ registration are lost
<button id='button' onclick='1'>Generate a 'click' event</button>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-support.js></script>
<script>
let callbackTime;
......
......@@ -5,6 +5,9 @@
<button id='button' onclick='1'>Generate a 'click' event</button>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-support.js></script>
<script>
......
......@@ -5,8 +5,11 @@
<button id='button' onclick='1'>Generate a 'click' event</button>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-support.js></script>
<img src=resources/slow-image.php>
<img src=resources/slow-image.py>
<script>
function validateEntries() {
......
......@@ -7,6 +7,9 @@
onfocus='mainThreadBusy(60)'>Generate a 'click' event</button>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/resources/testdriver.js></script>
<script src=/resources/testdriver-vendor.js></script>
<script src=resources/event-timing-support.js></script>
<script>
let trustedClickStart;
......
......@@ -2,7 +2,7 @@
<html>
<script src=event-timing-support.js></script>
<button id='button_child_frame' onclick='2'>Generate a 'click' event</button>
<img src=slow-image.php>
<img src=slow-image.py>
<script>
const clickTimeMin = performance.now();
clickAndBlockMain('button_child_frame');
......
// Clicks on the element with the given ID. It adds an event handler to the element
// which ensures that the events have a long duration and reported by EventTiming
// where appropriate.
// where appropriate. Calls |callback| during event handler.
function clickOnElement(id, callback) {
const element = document.getElementById(id);
const rect = element.getBoundingClientRect();
const xCenter = rect.x + rect.width / 2;
const yCenter = rect.y + rect.height / 2;
const leftButton = 0;
var pointerActions = [{
source: "mouse",
actions: [
{ name: "pointerDown", x: xCenter, y: yCenter, button: leftButton },
{ name: "pointerUp" },
]
}];
var clickHandler = () => {
const clickHandler = () => {
mainThreadBusy(60);
if (callback)
callback();
element.removeEventListener("click", clickHandler);
};
element.addEventListener("click", clickHandler);
if (!chrome || !chrome.gpuBenchmarking) {
reject();
} else {
chrome.gpuBenchmarking.pointerActionSequence(pointerActions);
}
test_driver.click(element);
}
function mainThreadBusy(duration) {
......@@ -64,7 +53,7 @@ function verifyClickEvent(entry, is_first=false) {
function wait() {
return new Promise((resolve, reject) => {
setTimeout(() => {
step_timeout(() => {
resolve();
}, 0);
});
......
import time
def main(request, response):
# Sleep for 500ms to delay onload.
time.sleep(0.5)
response.headers.set("Cache-Control", "no-cache, must-revalidate");
response.headers.set("Location", "data:image/gif;base64,R0lGODlhAQABAJAAAMjIyAAAACwAAAAAAQABAAACAgQBADs%3D");
<?php
// Sleep for 500ms to delay onload.
usleep(500000);
header('Cache-Control: no-cache, must-revalidate');
header('Location: data:image/gif;base64,R0lGODlhAQABAJAAAMjIyAAAACwAAAAAAQABAAACAgQBADs%3D');
?>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment