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

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

Issue 2706293013: Add tests for exiting from nested fullscreen (Closed)
Patch Set: tweak auto-click.js style Created 3 years, 10 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
(Empty)
1 <!DOCTYPE html>
2 <title>Document#exitFullscreen() for nested fullscreen</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script src="../trusted-click.js"></script>
6 <div><div></div></div>
7 <script>
8 async_test(t => {
9 const outer = document.querySelector("div");
10 const inner = outer.firstChild;
11
12 // First request fullscreen for the outer element.
13 trusted_request(t, outer);
14 document.onfullscreenchange = t.step_func(() => {
15 assert_equals(document.fullscreenElement, outer);
16
17 // Then request fullscreen for the inner element.
18 trusted_request(t, inner);
19 document.onfullscreenchange = t.step_func(() => {
20 assert_equals(document.fullscreenElement, inner);
21
22 // Now exit fullscreen.
23 document.exitFullscreen();
24 document.onfullscreenchange = t.step_func_done(() => {
25 assert_equals(document.fullscreenElement, outer);
26 });
27 });
28 });
29 document.onfullscreenerror = t.unreached_func("fullscreenerror event");
30 });
31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698