OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> |
| 3 <script> |
| 4 description('Test tracking event handlers with a reused DOMWindow.'); |
| 5 |
| 6 if (window.testRunner) { |
| 7 testRunner.setCanOpenWindows(); |
| 8 testRunner.waitUntilDone(); |
| 9 } |
| 10 |
| 11 // |window.open| returns a DOMWindow synchronously without waiting for the |
| 12 // network load to finish. Once the load completes, we transition the existing |
| 13 // window object to the document instead of creating a new one like we normally |
| 14 // would. The purpose of this test is to ensure event handlers added on the |
| 15 // window are still present after the window is reused with the new document. |
| 16 // See DocumentLoader.cpp for details. |
| 17 var newWindow = window.open('resources/conclude-test-in-parent.html'); |
| 18 newWindow.onscroll = function() {}; |
| 19 |
| 20 function concludeTest() { |
| 21 shouldBe('window.internals.scrollEventHandlerCount(newWindow.document)', '1'
); |
| 22 testRunner.notifyDone(); |
| 23 } |
| 24 </script> |
| 25 </body> |
OLD | NEW |