Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-timing-manual.html |
| diff --git a/third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-timing-manual.html b/third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-timing-manual.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7aff3b40a734cd670e4011cdff8264b62be4dd5f |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-timing-manual.html |
| @@ -0,0 +1,36 @@ |
| +<!DOCTYPE html> |
| +<title>Element#requestFullscreen() timing</title> |
| +<script src="/resources/testharness.js"></script> |
| +<script src="/resources/testharnessreport.js"></script> |
| +<script src="../trusted-click.js"></script> |
| +<script src="../event-timing.js"></script> |
| +<div id="log"></div> |
| +<script> |
| +async_test(t => { |
| + trusted_request(document.querySelector('div')); |
| + |
| + // If fullscreenchange is an animation frame event, then animation frame |
| + // callbacks should be run after it is fired, before the timer callback. |
| + // The resize event, if any, should fire before the fullscreenchange event. |
| + let resized = false; |
| + document.onfullscreenchange = t.step_func(() => { |
| + if (!resized) |
| + console.info('resize event timing not tested'); |
|
mlamouri (slow - plz ping)
2016/12/08 14:23:24
ditto -- based on the explanations above, shouldn'
|
| + window.onresize = t.unreached_func('resize event'); |
| + setTimeout(t.unreached_func('timer callback')); |
| + requestAnimationFrame(t.step_func_done()); |
| + }); |
| + window.onresize = t.step_func(() => resized = true); |
| +}, document.title + ' of fullscreenchange event'); |
| + |
| +async_test(t => { |
| + document.createElement('a').requestFullscreen(); |
| + |
| + // If fullscreenerror is an animation frame event, then animation frame |
| + // callbacks should be run after it is fired, before the timer callback. |
| + document.onfullscreenerror = t.step_func(() => { |
| + setTimeout(t.unreached_func('timer callback')); |
| + requestAnimationFrame(t.step_func_done()); |
| + }); |
| +}, document.title + ' of fullscreenerror event'); |
| +</script> |