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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/element-request-fullscreen-timing-manual.html

Issue 2564543002: Add tests for fullscreenchange and fullscreenerror event timing (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Element#requestFullscreen() timing</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script src="../trusted-click.js"></script>
6 <script src="../event-timing.js"></script>
7 <div id="log"></div>
8 <script>
9 async_test(t => {
10 trusted_request(document.querySelector('div'));
11
12 // If fullscreenchange is an animation frame event, then animation frame
13 // callbacks should be run after it is fired, before the timer callback.
14 // The resize event, if any, should fire before the fullscreenchange event.
15 let resized = false;
16 document.onfullscreenchange = t.step_func(() => {
17 if (!resized)
18 console.info('resize event timing not tested');
mlamouri (slow - plz ping) 2016/12/08 14:23:24 ditto -- based on the explanations above, shouldn'
19 window.onresize = t.unreached_func('resize event');
20 setTimeout(t.unreached_func('timer callback'));
21 requestAnimationFrame(t.step_func_done());
22 });
23 window.onresize = t.step_func(() => resized = true);
24 }, document.title + ' of fullscreenchange event');
25
26 async_test(t => {
27 document.createElement('a').requestFullscreen();
28
29 // If fullscreenerror is an animation frame event, then animation frame
30 // callbacks should be run after it is fired, before the timer callback.
31 document.onfullscreenerror = t.step_func(() => {
32 setTimeout(t.unreached_func('timer callback'));
33 requestAnimationFrame(t.step_func_done());
34 });
35 }, document.title + ' of fullscreenerror event');
36 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698