diff --git a/content/html/content/test/Makefile.in b/content/html/content/test/Makefile.in index 8e777f7f7b4..3b9e2b6a934 100644 --- a/content/html/content/test/Makefile.in +++ b/content/html/content/test/Makefile.in @@ -307,6 +307,7 @@ MOCHITEST_FILES = \ file_iframe_sandbox_pass.js \ file_iframe_sandbox_fail.js \ test_iframe_sandbox_navigation.html \ + test_iframe_sandbox_navigation2.html \ file_iframe_sandbox_d_if1.html \ file_iframe_sandbox_d_if2.html \ file_iframe_sandbox_d_if3.html \ @@ -320,6 +321,15 @@ MOCHITEST_FILES = \ file_iframe_sandbox_d_if11.html \ file_iframe_sandbox_d_if12.html \ file_iframe_sandbox_d_if13.html \ + file_iframe_sandbox_d_if14.html \ + file_iframe_sandbox_d_if15.html \ + file_iframe_sandbox_d_if16.html \ + file_iframe_sandbox_d_if17.html \ + file_iframe_sandbox_d_if18.html \ + file_iframe_sandbox_d_if19.html \ + file_iframe_sandbox_d_if20.html \ + file_iframe_sandbox_d_if21.html \ + file_iframe_sandbox_d_if22.html \ file_iframe_sandbox_navigation_start.html \ file_iframe_sandbox_navigation_pass.html \ file_iframe_sandbox_navigation_fail.html \ @@ -329,8 +339,19 @@ MOCHITEST_FILES = \ file_iframe_sandbox_e_if4.html \ file_iframe_sandbox_e_if5.html \ file_iframe_sandbox_e_if6.html \ + file_iframe_sandbox_e_if7.html \ + file_iframe_sandbox_e_if8.html \ + file_iframe_sandbox_e_if9.html \ + file_iframe_sandbox_e_if10.html \ + file_iframe_sandbox_e_if11.html \ + file_iframe_sandbox_e_if12.html \ + file_iframe_sandbox_e_if13.html \ + file_iframe_sandbox_e_if14.html \ + file_iframe_sandbox_e_if15.html \ + file_iframe_sandbox_e_if16.html \ file_iframe_sandbox_top_navigation_pass.html \ file_iframe_sandbox_top_navigation_fail.html \ + file_iframe_sandbox_window_navigation_fail.html \ test_iframe_sandbox_plugins.html \ file_iframe_sandbox_f_if1.html \ file_iframe_sandbox_f_if2.html \ diff --git a/content/html/content/test/file_iframe_sandbox_d_if1.html b/content/html/content/test/file_iframe_sandbox_d_if1.html index 8af6c6b1124..054edbfe148 100644 --- a/content/html/content/test/file_iframe_sandbox_d_if1.html +++ b/content/html/content/test/file_iframe_sandbox_d_if1.html @@ -14,6 +14,6 @@ function doTest() { I am sandboxed with 'allow-scripts' - + diff --git a/content/html/content/test/file_iframe_sandbox_d_if14.html b/content/html/content/test/file_iframe_sandbox_d_if14.html new file mode 100644 index 00000000000..3041fc448cf --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_d_if14.html @@ -0,0 +1,35 @@ + + + + + Tests for Bug 838692 + + + + + + + + I am sandboxed but with "allow-scripts allow-same-origin allow-top-navigation". + + navigate window + + diff --git a/content/html/content/test/file_iframe_sandbox_d_if15.html b/content/html/content/test/file_iframe_sandbox_d_if15.html new file mode 100644 index 00000000000..6c969c8fe1d --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_d_if15.html @@ -0,0 +1,14 @@ + + + + + Test for Bug 838692 + + + + + I am an unsandboxed iframe. + + + + diff --git a/content/html/content/test/file_iframe_sandbox_d_if16.html b/content/html/content/test/file_iframe_sandbox_d_if16.html new file mode 100644 index 00000000000..a27e098801b --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_d_if16.html @@ -0,0 +1,22 @@ + + + + + Test for Bug 838692 + + + + + + + + I am sandboxed with 'allow-same-origin allow-scripts' + + + + diff --git a/content/html/content/test/file_iframe_sandbox_d_if17.html b/content/html/content/test/file_iframe_sandbox_d_if17.html new file mode 100644 index 00000000000..047a08137d9 --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_d_if17.html @@ -0,0 +1,24 @@ + + + + + Test for Bug 838692 + + + + + + + I am sandboxed with 'allow-scripts' + + diff --git a/content/html/content/test/file_iframe_sandbox_d_if18.html b/content/html/content/test/file_iframe_sandbox_d_if18.html new file mode 100644 index 00000000000..03aa0aa9bd8 --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_d_if18.html @@ -0,0 +1,33 @@ + + + + + Test for Bug 838692 + + + + + + + + I am sandboxed with 'allow-scripts' + + + + diff --git a/content/html/content/test/file_iframe_sandbox_d_if19.html b/content/html/content/test/file_iframe_sandbox_d_if19.html new file mode 100644 index 00000000000..d766d264920 --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_d_if19.html @@ -0,0 +1,13 @@ + + + + + Test for Bug 838692 + + + + I am sandboxed with 'allow-scripts' + + + + diff --git a/content/html/content/test/file_iframe_sandbox_d_if2.html b/content/html/content/test/file_iframe_sandbox_d_if2.html index 5e51075a073..763585c6222 100644 --- a/content/html/content/test/file_iframe_sandbox_d_if2.html +++ b/content/html/content/test/file_iframe_sandbox_d_if2.html @@ -10,8 +10,8 @@ // needed to forward the message to the main test page window.addEventListener("message", receiveMessage, false); -function receiveMessage(event) { - window.parent.postMessage({ok: event.data.ok, desc: event.data.desc}, "*"); +function receiveMessage(event) { + window.parent.postMessage(event.data, "*"); } function doTest() { @@ -23,6 +23,6 @@ function doTest() { - + diff --git a/content/html/content/test/file_iframe_sandbox_d_if20.html b/content/html/content/test/file_iframe_sandbox_d_if20.html new file mode 100644 index 00000000000..49d6d6a44c4 --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_d_if20.html @@ -0,0 +1,25 @@ + + + + + Test for Bug 838692 + + + + + + + I am sandboxed with 'allow-scripts' + + diff --git a/content/html/content/test/file_iframe_sandbox_d_if21.html b/content/html/content/test/file_iframe_sandbox_d_if21.html new file mode 100644 index 00000000000..6d0ab232e0e --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_d_if21.html @@ -0,0 +1,14 @@ + + + + + Test for Bug 838692 + + + + + I am an unsandboxed iframe. + + + + diff --git a/content/html/content/test/file_iframe_sandbox_d_if22.html b/content/html/content/test/file_iframe_sandbox_d_if22.html new file mode 100644 index 00000000000..4edb24d1443 --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_d_if22.html @@ -0,0 +1,25 @@ + + + + + Test for Bug 838692 + + + + + + + I am sandboxed with 'allow-same-origin allow-scripts' + + diff --git a/content/html/content/test/file_iframe_sandbox_d_if4.html b/content/html/content/test/file_iframe_sandbox_d_if4.html index 8138d14f00d..692391b17c7 100644 --- a/content/html/content/test/file_iframe_sandbox_d_if4.html +++ b/content/html/content/test/file_iframe_sandbox_d_if4.html @@ -8,6 +8,7 @@ diff --git a/content/html/content/test/file_iframe_sandbox_d_if5.html b/content/html/content/test/file_iframe_sandbox_d_if5.html index 5191bd46fb8..f4845e21f8e 100644 --- a/content/html/content/test/file_iframe_sandbox_d_if5.html +++ b/content/html/content/test/file_iframe_sandbox_d_if5.html @@ -9,11 +9,12 @@ I am sandboxed with 'allow-scripts allow-same-origin' - + diff --git a/content/html/content/test/file_iframe_sandbox_d_if7.html b/content/html/content/test/file_iframe_sandbox_d_if7.html index 4b8062eb715..5023ee02946 100644 --- a/content/html/content/test/file_iframe_sandbox_d_if7.html +++ b/content/html/content/test/file_iframe_sandbox_d_if7.html @@ -1,16 +1,20 @@ - - - - - Test for Bug 341604 - - - - - I am sandboxed with 'allow-scripts' - - + + + + + Test for Bug 341604 + + + + + I am sandboxed with 'allow-scripts' + + diff --git a/content/html/content/test/file_iframe_sandbox_d_if8.html b/content/html/content/test/file_iframe_sandbox_d_if8.html index ded19cff55b..2f8618329ac 100644 --- a/content/html/content/test/file_iframe_sandbox_d_if8.html +++ b/content/html/content/test/file_iframe_sandbox_d_if8.html @@ -1,16 +1,24 @@ - - - - - Test for Bug 341604 - - - - - I am sandboxed with 'allow-scripts' and 'allow-same-origin' the first time I am loaded, and with 'allow-scripts' the second time - - + + + + + Test for Bug 341604 + + + + + I am sandboxed with 'allow-scripts' and 'allow-same-origin' the first time I am loaded, and with 'allow-scripts' the second time + + diff --git a/content/html/content/test/file_iframe_sandbox_e_if1.html b/content/html/content/test/file_iframe_sandbox_e_if1.html index 08ba5b70fc1..69f827ce498 100644 --- a/content/html/content/test/file_iframe_sandbox_e_if1.html +++ b/content/html/content/test/file_iframe_sandbox_e_if1.html @@ -1,24 +1,20 @@ - - - - - Test for Bug 341604 - - - - - - - - + + + + + Test for Bug 341604 + + + + + + + + + + diff --git a/content/html/content/test/file_iframe_sandbox_e_if10.html b/content/html/content/test/file_iframe_sandbox_e_if10.html new file mode 100644 index 00000000000..2484b8f3428 --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_e_if10.html @@ -0,0 +1,19 @@ + + + + + Test for Bug 838692 + + + + + + + + + diff --git a/content/html/content/test/file_iframe_sandbox_e_if11.html b/content/html/content/test/file_iframe_sandbox_e_if11.html new file mode 100644 index 00000000000..42c28021a04 --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_e_if11.html @@ -0,0 +1,24 @@ + + + + + Test for Bug 838692 + + + + + I am sandboxed with 'allow-scripts and allow-top-navigation' + + diff --git a/content/html/content/test/file_iframe_sandbox_e_if12.html b/content/html/content/test/file_iframe_sandbox_e_if12.html new file mode 100644 index 00000000000..0b1b87e09be --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_e_if12.html @@ -0,0 +1,19 @@ + + + + + Test for Bug 838692 + + + + + + + + + diff --git a/content/html/content/test/file_iframe_sandbox_e_if13.html b/content/html/content/test/file_iframe_sandbox_e_if13.html new file mode 100644 index 00000000000..f5cf912f679 --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_e_if13.html @@ -0,0 +1,19 @@ + + + + + Test for Bug 838692 + + + + + + + + + diff --git a/content/html/content/test/file_iframe_sandbox_e_if14.html b/content/html/content/test/file_iframe_sandbox_e_if14.html new file mode 100644 index 00000000000..76d97870203 --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_e_if14.html @@ -0,0 +1,24 @@ + + + + + Test for Bug 838692 + + + + + I am sandboxed with 'allow-scripts' + + diff --git a/content/html/content/test/file_iframe_sandbox_e_if15.html b/content/html/content/test/file_iframe_sandbox_e_if15.html new file mode 100644 index 00000000000..bf4138e1d69 --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_e_if15.html @@ -0,0 +1,17 @@ + + + + + Test for Bug 838692 + + + + + + + + + diff --git a/content/html/content/test/file_iframe_sandbox_e_if16.html b/content/html/content/test/file_iframe_sandbox_e_if16.html new file mode 100644 index 00000000000..06c8bf8714f --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_e_if16.html @@ -0,0 +1,27 @@ + + + + + Tests for Bug 838692 + + + + + + + I am sandboxed but with "allow-scripts" + + diff --git a/content/html/content/test/file_iframe_sandbox_e_if2.html b/content/html/content/test/file_iframe_sandbox_e_if2.html index 17b51dfd82b..47251d6dc8f 100644 --- a/content/html/content/test/file_iframe_sandbox_e_if2.html +++ b/content/html/content/test/file_iframe_sandbox_e_if2.html @@ -1,22 +1,12 @@ - - - - - Test for Bug 341604 - - - - - - - - + + + + + Test for Bug 341604 + + + + + + + diff --git a/content/html/content/test/file_iframe_sandbox_e_if6.html b/content/html/content/test/file_iframe_sandbox_e_if6.html index 4b74c34dd79..365d8322794 100644 --- a/content/html/content/test/file_iframe_sandbox_e_if6.html +++ b/content/html/content/test/file_iframe_sandbox_e_if6.html @@ -1,24 +1,22 @@ - - - - - Test for Bug 341604 - - - - - - - I am sandboxed with 'allow-scripts' - - - - + + + + + Test for Bug 341604 + + + + + + + I am sandboxed with 'allow-scripts' + + + + diff --git a/content/html/content/test/file_iframe_sandbox_e_if7.html b/content/html/content/test/file_iframe_sandbox_e_if7.html new file mode 100644 index 00000000000..9d60ed2dbc1 --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_e_if7.html @@ -0,0 +1,17 @@ + + + + + Test for Bug 838692 + + + + + + + + + diff --git a/content/html/content/test/file_iframe_sandbox_e_if8.html b/content/html/content/test/file_iframe_sandbox_e_if8.html new file mode 100644 index 00000000000..62d6178b134 --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_e_if8.html @@ -0,0 +1,23 @@ + + + + + Tests for Bug 838692 + + + + + + + + I am sandboxed but with "allow-scripts" + + navigate top + + diff --git a/content/html/content/test/file_iframe_sandbox_e_if9.html b/content/html/content/test/file_iframe_sandbox_e_if9.html new file mode 100644 index 00000000000..f18a16dba60 --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_e_if9.html @@ -0,0 +1,19 @@ + + + + + Test for Bug 838692 + + + + + + + + + diff --git a/content/html/content/test/file_iframe_sandbox_navigation_fail.html b/content/html/content/test/file_iframe_sandbox_navigation_fail.html index 151cf50765a..bae5276bd11 100644 --- a/content/html/content/test/file_iframe_sandbox_navigation_fail.html +++ b/content/html/content/test/file_iframe_sandbox_navigation_fail.html @@ -1,16 +1,17 @@ - - - - - Test for Bug 341604 - - - -FAIL - - - + + + + + Test for Bug 341604 + + + +FAIL + + + diff --git a/content/html/content/test/file_iframe_sandbox_navigation_pass.html b/content/html/content/test/file_iframe_sandbox_navigation_pass.html index 9f8ec967208..e07248247b0 100644 --- a/content/html/content/test/file_iframe_sandbox_navigation_pass.html +++ b/content/html/content/test/file_iframe_sandbox_navigation_pass.html @@ -1,16 +1,17 @@ - - - - - Test for Bug 341604 - - - - -PASS - - + + + + + Test for Bug 341604 + + + + +PASS + + diff --git a/content/html/content/test/file_iframe_sandbox_top_navigation_fail.html b/content/html/content/test/file_iframe_sandbox_top_navigation_fail.html index 9158dce65ce..dad6b2c006f 100644 --- a/content/html/content/test/file_iframe_sandbox_top_navigation_fail.html +++ b/content/html/content/test/file_iframe_sandbox_top_navigation_fail.html @@ -1,17 +1,18 @@ - - - - - Test for Bug 341604 - - - - -FAIL\ - - + + + + + Test for Bug 341604 + + + + +FAIL\ + + diff --git a/content/html/content/test/file_iframe_sandbox_top_navigation_pass.html b/content/html/content/test/file_iframe_sandbox_top_navigation_pass.html index 13b3acc596d..fe016ab2375 100644 --- a/content/html/content/test/file_iframe_sandbox_top_navigation_pass.html +++ b/content/html/content/test/file_iframe_sandbox_top_navigation_pass.html @@ -1,17 +1,18 @@ - - - - - Test for Bug 341604 - - - - -PASS - - + + + + + Test for Bug 341604 + + + + +PASS + + diff --git a/content/html/content/test/file_iframe_sandbox_window_navigation_fail.html b/content/html/content/test/file_iframe_sandbox_window_navigation_fail.html new file mode 100644 index 00000000000..f8e3c83ce81 --- /dev/null +++ b/content/html/content/test/file_iframe_sandbox_window_navigation_fail.html @@ -0,0 +1,20 @@ + + + + + Test for Bug 838692 + + + + + + +FAIL + + diff --git a/content/html/content/test/test_iframe_sandbox_navigation.html b/content/html/content/test/test_iframe_sandbox_navigation.html index 7bfc6cdbb89..32793ce3e92 100644 --- a/content/html/content/test/test_iframe_sandbox_navigation.html +++ b/content/html/content/test/test_iframe_sandbox_navigation.html @@ -1,234 +1,271 @@ - - - - - - Test for Bug 341604 - navigation - - - - - - -Mozilla Bug 341604 - Implement HTML5 sandbox attribute for IFRAMEs -

-
- - - - - - - - - -
- - - - + + + + + + Test for Bug 341604 - navigation + + + + + + +Mozilla Bug 341604 - Implement HTML5 sandbox attribute for IFRAMEs +

+
+ + + + + + + + + +
+ + + + diff --git a/content/html/content/test/test_iframe_sandbox_navigation2.html b/content/html/content/test/test_iframe_sandbox_navigation2.html new file mode 100644 index 00000000000..a4b2a4d8a38 --- /dev/null +++ b/content/html/content/test/test_iframe_sandbox_navigation2.html @@ -0,0 +1,187 @@ + + + + + + Test for Bug 341604 - navigation + + + + + + +Mozilla Bug 341604 - Implement HTML5 sandbox attribute for IFRAMEs +

+
+ + + + + + +
+ + diff --git a/testing/mochitest/b2g.json b/testing/mochitest/b2g.json index dc801515ac3..4363d7a9f0b 100644 --- a/testing/mochitest/b2g.json +++ b/testing/mochitest/b2g.json @@ -75,6 +75,7 @@ "content/html/content/test/test_fullscreen-api.html":"", "content/html/content/test/test_iframe_sandbox_inheritance.html":"", "content/html/content/test/test_iframe_sandbox_navigation.html":"", + "content/html/content/test/test_iframe_sandbox_navigation2.html":"multiple concurrent window.open()s fail on B2G", "content/html/content/test/test_formSubmission.html":"", "content/html/content/test/test_iframe_sandbox_plugins.html":"", "content/html/content/test/test_object_plugin_nav.html":"",