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

Side by Side Diff: third_party/WebKit/LayoutTests/shadow-dom/fullscreen-element-in-shadow-complex.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/shadow-dom/fullscreen-element-in-shadow-simple.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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='host1'>
8 <template data-mode='open'>
9 <slot></slot>
10 </template>
11 <div id='host2'>
12 <template data-mode='open'>
13 <div id='host3'>
14 <template data-mode='open'>
15 <canvas></canvas>
16 <div id='host4'>
17 <template data-mode='open'>
18 <div></div>
19 </template>
20 </div>
21 </template>
22 </div>
23 <div id='host5'>
24 <template data-mode='open'>
25 <div></div>
26 </template>
27 </div>
28 </template>
29 </div>
30 </div>
31
32 <script>
33 async_test((test) => {
34 document.onfullscreenerror = test.unreached_func('onfullscreenerror is not e xpected.');
35
36 convertTemplatesToShadowRootsWithin(host1);
37
38 var host3 = host2.shadowRoot.querySelector('#host3');
39 var host4 = host3.shadowRoot.querySelector('#host4');
40 var host5 = host2.shadowRoot.querySelector('#host5');
41
42 // All fullscreenElement should default to null.
43 assert_equals(document.fullscreenElement, null);
44 assert_equals(document.webkitFullscreenElement, null);
45 assert_equals(document.webkitCurrentFullScreenElement, null);
46 assert_equals(host1.shadowRoot.fullscreenElement, null);
47 assert_equals(host2.shadowRoot.fullscreenElement, null);
48 assert_equals(host3.shadowRoot.fullscreenElement, null);
49 assert_equals(host4.shadowRoot.fullscreenElement, null);
50 assert_equals(host5.shadowRoot.fullscreenElement, null);
51
52 var canvas = host3.shadowRoot.querySelector('canvas');
53 trusted_request(canvas);
54
55 document.onfullscreenchange = test.step_func(() => {
56 // Not interested in handling before or after exitFullscreen.
57 if (document.fullscreenElement === null)
58 return;
59
60 assert_equals(document.fullscreenElement, host2);
61 assert_equals(document.webkitFullscreenElement, host2);
62 assert_equals(document.webkitCurrentFullScreenElement, host2);
63
64 assert_equals(host1.shadowRoot.fullscreenElement, null);
65 assert_equals(host2.shadowRoot.fullscreenElement, host3);
66 assert_equals(host3.shadowRoot.fullscreenElement, canvas);
67 assert_equals(host4.shadowRoot.fullscreenElement, null);
68 assert_equals(host5.shadowRoot.fullscreenElement, null);
69
70 document.exitFullscreen();
71 test.done();
72 });
73
74 }, 'Test for fullscreenElement adjustment for multiple shadow trees.');
75 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/shadow-dom/fullscreen-element-in-shadow-simple.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698