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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/v0/fullscreen-element-in-v0.html

Issue 2340263003: Move Document.fullscreenElement to DocumentOrShadowRoot (Closed)
Patch Set: Style nit Created 4 years, 1 month 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 <script src='../../resources/testharness.js'></script>
3 <script src='../../resources/testharnessreport.js'></script>
4 <script src='../resources/shadow-dom.js'></script>
5 <script src='../../fullscreen/trusted-event.js'></script>
6
7 <div id='host0'>
8 <template data-mode='v0'>
9 <canvas></canvas>
10 </template>
11 </div>
12
13 <script>
14 convertTemplatesToShadowRootsWithin(host0);
15
16 async_test((test) => {
17 document.onfullscreenerror = test.unreached_func('onfullscreenerror is not e xpected.');
18
19 // All fullscreenElement should default to null.
20 assert_equals(document.fullscreenElement, null);
21 assert_equals(document.webkitFullscreenElement, null);
22 assert_equals(document.webkitCurrentFullScreenElement, null);
23 assert_equals(host0.shadowRoot.fullscreenElement, null);
24
25 var canvas = host0.shadowRoot.querySelector('canvas');
26 trusted_request(canvas);
27
28 document.onfullscreenchange = test.step_func(() => {
29 // Not interested in handling before or after exitFullscreen.
30 if (document.fullscreenElement === null)
31 return;
32
33 // fullscreen element in V0 shadow root will not be retargeted.
34 assert_equals(document.fullscreenElement, canvas);
35 assert_equals(document.webkitFullscreenElement, canvas);
36 assert_equals(document.webkitCurrentFullScreenElement, canvas);
37
38 assert_equals(host0.shadowRoot.fullscreenElement, null);
39 document.exitFullscreen();
40 test.done();
41 });
42
43 }, 'Test for fullscreenElement adjustment for single shadow tree.');
44 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698