| <html> |
| <head> |
| <script> |
| function test() { |
| if (window.layoutTestController) { |
| layoutTestController.setCanOpenWindows(); |
| layoutTestController.dumpAsText(); |
| layoutTestController.waitUntilDone(); |
| } |
| |
| newWindow = window.open('resources/early-document-access-popup.html'); |
| if (newWindow) { |
| newWindow.document; // access the document |
| } else { |
| document.body.innerText = 'FAIL: window.open failed to make a window.'; |
| if (window.layoutTestController) |
| layoutTestController.notifyDone(); |
| } |
| } |
| |
| function done() { |
| if (window.layoutTestController) |
| if (layoutTestController.windowCount() == 1) |
| layoutTestController.notifyDone(); |
| else |
| setTimeout("done()", 100); |
| } |
| |
| function pass() { |
| document.body.innerText = 'PASS'; |
| newWindow.close(); |
| done(); |
| } |
| |
| function fail() { |
| document.body.innerText = 'FAIL'; |
| newWindow.close(); |
| done(); |
| } |
| </script> |
| </head> |
| <body onload="test()"> |
| FAIL: TEST DID NOT RUN! |
| </body> |
| </html> |