| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 | |
| 3 <script> | |
| 4 if (window.layoutTestController) { | |
| 5 layoutTestController.dumpAsText(); | |
| 6 layoutTestController.waitUntilDone(); | |
| 7 } | |
| 8 | |
| 9 function onmessage(evt) { | |
| 10 alert(evt.data); | |
| 11 | |
| 12 if (evt.data == 'done' && window.layoutTestController) | |
| 13 layoutTestController.notifyDone(); | |
| 14 } | |
| 15 | |
| 16 function run_test() { | |
| 17 window.addEventListener('message', onmessage); | |
| 18 try { | |
| 19 window.postMessage('1', 1, '*') | |
| 20 window.postMessage('2', "", '*') | |
| 21 window.postMessage('3', window, '*') | |
| 22 window.postMessage('4', { x: 1 }, '*') | |
| 23 window.postMessage('5', null, '*') | |
| 24 window.postMessage('6', void 0, '*') | |
| 25 window.postMessage('done', '*') | |
| 26 } catch(e) { | |
| 27 alert(e); | |
| 28 if (window.layoutTestController) | |
| 29 layoutTestController.notifyDone(); | |
| 30 } | |
| 31 } | |
| 32 | |
| 33 </script> | |
| 34 <body onload='run_test()'> | |
| 35 </body> | |
| 36 </html> | |
| OLD | NEW |