| OLD | NEW |
| 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='host1'> | 7 <div id='host1'> |
| 8 <template data-mode='open'> | 8 <template data-mode='open'> |
| 9 <slot></slot> | 9 <slot></slot> |
| 10 </template> | 10 </template> |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 assert_equals(document.fullscreenElement, host2); | 60 assert_equals(document.fullscreenElement, host2); |
| 61 assert_equals(document.webkitFullscreenElement, host2); | 61 assert_equals(document.webkitFullscreenElement, host2); |
| 62 assert_equals(document.webkitCurrentFullScreenElement, host2); | 62 assert_equals(document.webkitCurrentFullScreenElement, host2); |
| 63 | 63 |
| 64 assert_equals(host1.shadowRoot.fullscreenElement, null); | 64 assert_equals(host1.shadowRoot.fullscreenElement, null); |
| 65 assert_equals(host2.shadowRoot.fullscreenElement, host3); | 65 assert_equals(host2.shadowRoot.fullscreenElement, host3); |
| 66 assert_equals(host3.shadowRoot.fullscreenElement, canvas); | 66 assert_equals(host3.shadowRoot.fullscreenElement, canvas); |
| 67 assert_equals(host4.shadowRoot.fullscreenElement, null); | 67 assert_equals(host4.shadowRoot.fullscreenElement, null); |
| 68 assert_equals(host5.shadowRoot.fullscreenElement, null); | 68 assert_equals(host5.shadowRoot.fullscreenElement, null); |
| 69 | 69 |
| 70 // TODO(kochi): The 'retargeting' behavior is controlled by |
| 71 // 'FullscreenUnprefixed' runtime flag dynamically. Until the |
| 72 // flag is turned on, document.webkitFullscreenElement leaks the |
| 73 // fullscreen element under shadow roots. |
| 74 window.internals.runtimeFlags.fullscreenUnprefixedEnabled = false; |
| 75 assert_false(window.internals.runtimeFlags.fullscreenUnprefixedEnabled); |
| 76 assert_equals(document.webkitFullscreenElement, canvas); |
| 77 assert_equals(document.webkitCurrentFullScreenElement, canvas); |
| 78 |
| 70 document.exitFullscreen(); | 79 document.exitFullscreen(); |
| 71 test.done(); | 80 test.done(); |
| 72 }); | 81 }); |
| 73 | 82 |
| 74 }, 'Test for fullscreenElement adjustment for multiple shadow trees.'); | 83 }, 'Test for fullscreenElement adjustment for multiple shadow trees.'); |
| 75 </script> | 84 </script> |
| OLD | NEW |