1 <html> 2 <body> 3 <script> 4 i = 0; 5 windowArgs = "top=100, left=100, height=200, width=200"; 6 windowName = ""; 7 8 w = window.open("", windowName + i++, windowArgs); 9 w.document.write("PASS: document.write after window.open(\"\", ...) worked."); 10 w.document.close(); 11 12 w = window.open("", windowName + i++, windowArgs); 13 w.document.open(); 14 w.document.write("PASS: document.write after window.open(\"\", ...) worked."); 15 w.document.close(); 16 17 18 w = window.open("about:blank", windowName + i++, windowArgs); 19 w.document.write("PASS: document.write after window.open(\"about:blank\", ...) worked."); 20 w.document.close(); 21 22 w = window.open("about:blank", windowName + i++, windowArgs); 23 w.document.open(); 24 w.document.write("PASS: document.write after window.open(\"about:blank\", ...) worked."); 25 w.document.close(); 26 27 28 w = window.open("resources/write-after-open-popup.html", windowName + i++, windowArgs); 29 w.document.write("PASS: document.write after window.open(\"resources/write-after-open-popup.html\", ...) worked."); 30 w.document.close(); 31 32 w = window.open("resources/write-after-open-popup.html", windowName + i++, windowArgs); 33 w.document.open(); 34 w.document.write("PASS: document.write after window.open(\"resources/write-after-open-popup.html\", ...) worked."); 35 w.document.close(); 36 </script> 37 38 <p>This test checks for regression against: <rdar://problem/3461547> can't use document.writeln() on windows opened via window.open("about:blank") in same function. </p> 39 40 <p>On success, 6 windows will open, one on top of the other, each containing a PASS message.</p> 41 </body> 42 </html> 43