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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/fullscreen-element-in-shadow-simple.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='open'>
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 assert_equals(document.fullscreenElement, host0);
34 assert_equals(document.webkitFullscreenElement, host0);
35 assert_equals(document.webkitCurrentFullScreenElement, host0);
36
37 assert_equals(host0.shadowRoot.fullscreenElement, canvas);
38 document.exitFullscreen();
39 test.done();
40 });
41
42 }, 'Test for fullscreenElement adjustment for single shadow tree.');
43 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698