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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/fullscreen/api/document-exit-fullscreen-twice-manual.html

Issue 2610243002: Import wpt@5e1a3b80cea8d36774d2afd78b29a74792e9f15a (Closed)
Patch Set: Rebased 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Document#exitFullscreen() called twice</title> 2 <title>Document#exitFullscreen() called twice</title>
3 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script> 4 <script src="/resources/testharnessreport.js"></script>
5 <script src="../trusted-click.js"></script> 5 <script src="../trusted-click.js"></script>
6 <div id="log"></div> 6 <div id="log"></div>
7 <script> 7 <script>
8 async_test(t => { 8 async_test(t => {
9 const div = document.querySelector("div"); 9 const div = document.querySelector("div");
10 10
11 document.onfullscreenchange = t.step_func(() => { 11 document.onfullscreenchange = t.step_func(() => {
12 // We are now in fullscreen. 12 // We are now in fullscreen.
13 assert_equals(document.fullscreenElement, div); 13 assert_equals(document.fullscreenElement, div);
14 14
15 document.onfullscreenchange = t.step_func(() => { 15 document.onfullscreenchange = t.step_func(() => {
16 assert_equals(document.fullscreenElement, null); 16 assert_equals(document.fullscreenElement, null);
17 // Done, but ensure that there's only one fullscreenchange event. 17 // Done, but ensure that there's only one fullscreenchange event.
18 document.onfullscreenchange = t.unreached_func("second fullscreenchange ev ent"); 18 document.onfullscreenchange = t.unreached_func("second fullscreenchange ev ent");
19 setTimeout(t.step_func_done(), 0); 19 setTimeout(t.step_func_done(), 0);
20 }); 20 });
21 21
22 // Exit fullscreen twice. 22 // Exit fullscreen twice.
23 document.exitFullscreen(); 23 document.exitFullscreen();
24 assert_equals(document.fullscreenElement, div, "fullscreenElement after firs t exitFullscreen()"); 24 assert_equals(document.fullscreenElement, div, "fullscreenElement after firs t exitFullscreen()");
25 document.exitFullscreen(); 25 document.exitFullscreen();
26 assert_equals(document.fullscreenElement, div, "fullscreenElement after seco nd exitFullscreen()"); 26 assert_equals(document.fullscreenElement, div, "fullscreenElement after seco nd exitFullscreen()");
27 }); 27 });
28 document.onfullscreenerror = t.unreached_func("fullscreenerror event"); 28 document.onfullscreenerror = t.unreached_func("fullscreenerror event");
29 29
30 trusted_request(div); 30 trusted_request(t, div);
31 }); 31 });
32 </script> 32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698