Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="/js-test-resources/js-test.js"></script> | 2 <script src="/js-test-resources/js-test.js"></script> |
| 3 <body> | 3 <body> |
| 4 <script> | 4 <script> |
| 5 window.jsTestIsAsync = true; | 5 window.jsTestIsAsync = true; |
| 6 description('Test that closing the window during Service Worker registration doe s not assert or crash'); | 6 description('Test that resolving a promise after the window gets closed does not assert or crash'); |
|
Michael van Ouwerkerk
2014/07/24 14:38:51
Could you add a similar test for Push Messaging?
nhiroki
2014/07/24 15:52:31
I couldn't find a place of layout tests for Push M
nhiroki
2014/07/24 15:55:33
Oops... sorry, I just found "WebKit/LayoutTests/pu
nhiroki
2014/07/24 16:35:52
Done.
| |
| 7 | 7 |
| 8 if (window.testRunner) { | 8 if (window.testRunner) { |
| 9 testRunner.setCanOpenWindows(); | 9 testRunner.setCanOpenWindows(); |
| 10 openWindow(); | 10 openWindow(); |
| 11 } else { | 11 } else { |
| 12 document.write('<p>Click <a href="javascript:openWindow()">this link</a>. A window should open and close without asserting or crashing.</p>'); | 12 document.write('<p>Click <a href="javascript:openWindow()">this link</a>. A window should open and close without asserting or crashing.</p>'); |
| 13 } | 13 } |
| 14 | 14 |
| 15 function openWindow() { | 15 function openWindow() { |
| 16 window.open('resources/window-close-during-registration.html'); | 16 window.open('resources/resolve-after-window-close.html'); |
| 17 } | 17 } |
| 18 | 18 |
| 19 function done() { | 19 function done() { |
| 20 setTimeout(function() { | 20 finishJSTest(); |
| 21 finishJSTest(); | |
| 22 }, 100); | |
| 23 } | 21 } |
| 24 </script> | 22 </script> |
| 25 </body> | 23 </body> |
| OLD | NEW |