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

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

Issue 2446323003: Add tests while FullscreenUnprefixed flag is turned off. (Closed)
Patch Set: rebase 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src='../resources/testharness.js'></script> 2 <script src='../resources/testharness.js'></script>
3 <script src='../resources/testharnessreport.js'></script> 3 <script src='../resources/testharnessreport.js'></script>
4 <script src='resources/shadow-dom.js'></script> 4 <script src='resources/shadow-dom.js'></script>
5 <script src='../fullscreen/trusted-event.js'></script> 5 <script src='../fullscreen/trusted-event.js'></script>
6 6
7 <div id='host0'> 7 <div id='host0'>
8 <template data-mode='open'> 8 <template data-mode='open'>
9 <canvas></canvas> 9 <canvas></canvas>
10 </template> 10 </template>
(...skipping 17 matching lines...) Expand all
28 document.onfullscreenchange = test.step_func(() => { 28 document.onfullscreenchange = test.step_func(() => {
29 // Not interested in handling before or after exitFullscreen. 29 // Not interested in handling before or after exitFullscreen.
30 if (document.fullscreenElement === null) 30 if (document.fullscreenElement === null)
31 return; 31 return;
32 32
33 assert_equals(document.fullscreenElement, host0); 33 assert_equals(document.fullscreenElement, host0);
34 assert_equals(document.webkitFullscreenElement, host0); 34 assert_equals(document.webkitFullscreenElement, host0);
35 assert_equals(document.webkitCurrentFullScreenElement, host0); 35 assert_equals(document.webkitCurrentFullScreenElement, host0);
36 36
37 assert_equals(host0.shadowRoot.fullscreenElement, canvas); 37 assert_equals(host0.shadowRoot.fullscreenElement, canvas);
38
39 // TODO(kochi): The 'retargeting' behavior is controlled by
40 // 'FullscreenUnprefixed' runtime flag dynamically. Until the
41 // flag is turned on, document.webkitFullscreenElement leaks the
42 // fullscreen element under shadow roots.
43 window.internals.runtimeFlags.fullscreenUnprefixedEnabled = false;
44 assert_false(window.internals.runtimeFlags.fullscreenUnprefixedEnabled);
45 assert_equals(document.webkitFullscreenElement, canvas);
46 assert_equals(document.webkitCurrentFullScreenElement, canvas);
47
38 document.exitFullscreen(); 48 document.exitFullscreen();
39 test.done(); 49 test.done();
40 }); 50 });
41 51
42 }, 'Test for fullscreenElement adjustment for single shadow tree.'); 52 }, 'Test for fullscreenElement adjustment for single shadow tree.');
43 </script> 53 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698