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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/fullscreen/api/document-exit-fullscreen-nested-in-iframe-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 inside an iframe</title>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script src="../trusted-click.js"></script>
6 <iframe allowfullscreen></iframe>
7 <script>
8 window.t = async_test();
9 t.step(() => {
10 const iframe = document.querySelector("iframe");
11 iframe.srcdoc = "<div><div></div></div>";
12 iframe.onload = t.step_func(() => {
13 const doc = iframe.contentDocument;
14 const outer = doc.querySelector("div");
15 const inner = outer.firstChild;
16
17 // First request fullscreen for the outer element.
18 trusted_request(t, outer);
19 doc.onfullscreenchange = t.step_func(() => {
20 assert_equals(document.fullscreenElement, iframe);
21 assert_equals(doc.fullscreenElement, outer);
22
23 // Then request fullscreen for the inner element.
24 trusted_request(t, inner);
25 doc.onfullscreenchange = t.step_func(() => {
26 assert_equals(document.fullscreenElement, iframe);
27 assert_equals(doc.fullscreenElement, inner);
28
29 // Now exit fullscreen for the iframe's content document.
30 doc.exitFullscreen();
31 doc.onfullscreenchange = t.step_func_done(() => {
32 assert_equals(document.fullscreenElement, iframe);
33 assert_equals(doc.fullscreenElement, outer);
34 });
35 });
36 });
37 doc.onfullscreenerror = t.unreached_func("fullscreenerror event");
38 });
39 });
40 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698