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

Side by Side Diff: third_party/WebKit/LayoutTests/fullscreen/api/element-request-fullscreen-two-elements.html

Issue 2550703002: Move pending state from FullscreenController to Fullscreen (Closed)
Patch Set: tests and documentation 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() on two elements in the same document</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../trusted-click.js"></script>
6 <div id="log"></div>
7 <div id="a"></div>
8 <div id="b"></div>
9 <script>
10 // Adapted from https://github.com/w3c/web-platform-tests/pull/4250
11 // TODO(foolip): Remove this test when the above is imported and passing.
12 async_test(t => {
13 // Request fullscreen on both elements, but in reverse tree order.
14 const a = document.getElementById('a');
15 const b = document.getElementById('b');
16
17 // Expect first a fullscreenchange event for the first request, then a
18 // fullscreenerror event for the second request. TODO(foolip): Remove the
19 // Fullscreen hierarchy restrictions. https://crbug.com/627792
20 document.onfullscreenchange = t.step_func(() => {
21 assert_equals(document.fullscreenElement, b);
22 document.onfullscreenerror = t.step_func_done();
23 });
24
25 trusted_click(t.step_func(() => {
26 b.requestFullscreen();
27 a.requestFullscreen();
28 }), document.body);
29 });
30 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698