Test for bug 696651 part 2 - Establish document.write() insertion position before re-entrant calls can occur. r=Olli.Pettay.

This commit is contained in:
Henri Sivonen 2011-10-29 23:14:32 +03:00
parent ee0602fba9
commit ae7f6032b1
8 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1 @@
<!DOCTYPE html>CcBbAa

View File

@ -0,0 +1,2 @@
<!DOCTYPE html>
<body><script>document.write("\u003cscript>document.write(\"\\u003cscript src='bug696651-external.js'>\\u003c/script>B\"); document.write(\"b\");\u003c/script>A"); document.write("a");</script>

View File

@ -0,0 +1,2 @@
<!DOCTYPE html>
<body><script>document.write("\u003cscript>document.write(\"\\u003cscript src='data:text/javascript,document.write(%27C%27);%20document.write(%27c%27);'>\\u003c/script>B\"); document.write(\"b\");\u003c/script>A"); document.write("a");</script>

View File

@ -0,0 +1 @@
<!DOCTYPE html><iframe src="data:text/html,<!DOCTYPE html>CcBbAa"></iframe>

View File

@ -0,0 +1,6 @@
<!DOCTYPE html>
<body>
<iframe></iframe>
<script>
var doc = document.getElementsByTagName("iframe")[0].contentDocument;
doc.open(); doc.write("\u003cscript>document.write(\"\\u003cscript src='bug696651-external.js'>\\u003c/script>B\"); document.write(\"b\");\u003c/script>A"); doc.write("a"); doc.close();</script>

View File

@ -0,0 +1,6 @@
<!DOCTYPE html>
<body>
<iframe></iframe>
<script>
var doc = document.getElementsByTagName("iframe")[0].contentDocument;
doc.open(); doc.write("\u003cscript>document.write(\"\\u003cscript src='data:text/javascript,document.write(%27C%27);%20document.write(%27c%27);'>\\u003c/script>B\"); document.write(\"b\");\u003c/script>A"); doc.write("a"); doc.close();</script>

View File

@ -0,0 +1 @@
document.write("C"); document.write("c");

View File

@ -5,3 +5,5 @@
== bug592656-1.html bug592656-1-ref.html
== bug608373-1.html bug608373-1-ref.html
== view-source:bug673094-1.html view-source:bug673094-1-ref.html
== bug696651-1.html bug696651-1-ref.html
== bug696651-2.html bug696651-2-ref.html