| 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='host0'> | 7 <div id='host0'> |
| 8 <template data-mode='v0'> | 8 <template data-mode='v0'> |
| 9 <canvas></canvas> | 9 <canvas></canvas> |
| 10 </template> | 10 </template> |
| (...skipping 18 matching lines...) Expand all Loading... |
| 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 // fullscreen element in V0 shadow root will not be retargeted. | 33 // fullscreen element in V0 shadow root will not be retargeted. |
| 34 assert_equals(document.fullscreenElement, canvas); | 34 assert_equals(document.fullscreenElement, canvas); |
| 35 assert_equals(document.webkitFullscreenElement, canvas); | 35 assert_equals(document.webkitFullscreenElement, canvas); |
| 36 assert_equals(document.webkitCurrentFullScreenElement, canvas); | 36 assert_equals(document.webkitCurrentFullScreenElement, canvas); |
| 37 | 37 |
| 38 assert_equals(host0.shadowRoot.fullscreenElement, null); | 38 assert_equals(host0.shadowRoot.fullscreenElement, null); |
| 39 |
| 40 // TODO(kochi): The 'retargeting' behavior is controlled by |
| 41 // 'FullscreenUnprefixed' runtime flag dynamically. Until the |
| 42 // flag is turned on, document.webkitFullscreenElement leaks the |
| 43 // fullscreen element under shadow roots. |
| 44 window.internals.runtimeFlags.fullscreenUnprefixedEnabled = false; |
| 45 assert_false(window.internals.runtimeFlags.fullscreenUnprefixedEnabled); |
| 46 assert_equals(document.webkitFullscreenElement, canvas); |
| 47 assert_equals(document.webkitCurrentFullScreenElement, canvas); |
| 48 |
| 39 document.exitFullscreen(); | 49 document.exitFullscreen(); |
| 40 test.done(); | 50 test.done(); |
| 41 }); | 51 }); |
| 42 | 52 |
| 43 }, 'Test for fullscreenElement adjustment for single shadow tree.'); | 53 }, 'Test for fullscreenElement adjustment for single shadow tree.'); |
| 44 </script> | 54 </script> |
| OLD | NEW |