| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 <!DOCTYPE html> | 
|  | 2 <title>Element#requestFullscreen() on two elements in the same document</title> | 
|  | 3 <script src="../../resources/testharness.js"></script> | 
|  | 4 <script src="../../resources/testharnessreport.js"></script> | 
|  | 5 <script src="../trusted-click.js"></script> | 
|  | 6 <div id="log"></div> | 
|  | 7 <div id="a"></div> | 
|  | 8 <div id="b"></div> | 
|  | 9 <script> | 
|  | 10 // Adapted from https://github.com/w3c/web-platform-tests/pull/4250 | 
|  | 11 // TODO(foolip): Remove this test when the above is imported and passing. | 
|  | 12 async_test(t => { | 
|  | 13   // Request fullscreen on both elements, but in reverse tree order. | 
|  | 14   const a = document.getElementById('a'); | 
|  | 15   const b = document.getElementById('b'); | 
|  | 16 | 
|  | 17   // Expect first a fullscreenchange event for the first request, then a | 
|  | 18   // fullscreenerror event for the second request. TODO(foolip): Remove the | 
|  | 19   // Fullscreen hierarchy restrictions. https://crbug.com/627792 | 
|  | 20   document.onfullscreenchange = t.step_func(() => { | 
|  | 21     assert_equals(document.fullscreenElement, b); | 
|  | 22     document.onfullscreenerror = t.step_func_done(); | 
|  | 23   }); | 
|  | 24 | 
|  | 25   trusted_click(t.step_func(() => { | 
|  | 26     b.requestFullscreen(); | 
|  | 27     a.requestFullscreen(); | 
|  | 28   }), document.body); | 
|  | 29 }); | 
|  | 30 </script> | 
| OLD | NEW | 
|---|