# HG changeset patch # User Ryo HIKOSAKA # Date 1392759461 -32400 # Wed Feb 19 06:37:41 2014 +0900 # Node ID 88ddde390756135b21a7edafe16830c36cd908db # Parent ac8b0a19779d0889bbd667723013bd77fd445932 Part22: mochitests - iframe sandbox popups diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_close.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_close.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,3 @@ + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_h_if1.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_h_if1.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,34 @@ + + + + + Tests for Bug 949435 + + + + + + + I am sandboxed but with "allow-popups allow-scripts allow-same-origin" + + open window + open window + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_j_if1.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_j_if1.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,30 @@ + + + + + Test for Bug 949435 + + + + + + + I am sandboxed with "allow-scripts allow-popups allow-same-origin allow-forms allow-top-navigation". + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_j_if2.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_j_if2.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,28 @@ + + + + + Test for Bug 949435 + + + + + + + I am sandboxed but with "allow-scripts allow-popups allow-same-origin". + After my initial load, "allow-same-origin" is removed and then I open file_iframe_sandbox_k_if9.html, + which attemps to call a function in my parent. + This should succeed since the new sandbox flags shouldn't have taken affect on me until I'm reloaded. + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_j_if3.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_j_if3.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,27 @@ + + + + + Tests for Bug 949435 + + + + + + I am sandboxed but with "allow-popups allow-scripts allow-same-origin" + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_k_if1.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_k_if1.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,47 @@ + + + + + Test for Bug 949435 + + + + + + I am navigated to from file_iframe_sandbox_k_if8.html. + This was opened in an iframe with "allow-scripts allow-popups allow-same-origin". + However allow-same-origin was removed from the iframe before navigating to me, + so I should only have "allow-scripts allow-popups" in force. + open window + open window + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_k_if2.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_k_if2.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,50 @@ + + + + + Test for Bug 949435 + + + + + + + I am not sandboxed directly, but opened from a sandboxed document with 'allow-scripts allow-popups' + +
+ First name: + Last name: + +
+ + + + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_k_if3.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_k_if3.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,20 @@ + + + + + Test for Bug 949435 + + + + + + I am sandboxed with 'allow-scripts allow-popups' + + + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_k_if4.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_k_if4.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,34 @@ + + + + + Test for Bug 949435 + + + + + + + + I am sandboxed with "allow-scripts allow-popups allow-same-origin allow-forms allow-top-navigation". + open window + open window + + open window + open window + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_k_if5.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_k_if5.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,33 @@ + + + + + Test for Bug 949435 + + + + + + + I am not sandboxed directly, but opened from a sandboxed document with at least + 'allow-scripts allow-popups allow-same-origin allow-top-navigation' + + + + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_k_if6.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_k_if6.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,21 @@ + + + + + Test for Bug 949435 + + + + + + + + I am sandboxed with at least 'allow-scripts allow-popups allow-top-navigation' + + + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_k_if7.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_k_if7.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,26 @@ + + + + + Test for Bug 949435 + + + + + + + I am not sandboxed directly, but opened from a sandboxed document with at least + 'allow-scripts allow-popups allow-forms allow-same-origin' + +
+ First name: + Last name: + +
+ + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_k_if8.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_k_if8.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,36 @@ + + + + + Test for Bug 949435 + + + + + + + + I am sandboxed but with "allow-scripts allow-popups allow-same-origin". + After my initial load, "allow-same-origin" is removed and then I open file_iframe_sandbox_k_if9.html + in 3 different ways, which attemps to call a function in my parent. + This should succeed since the new sandbox flags shouldn't have taken affect on me until I'm reloaded. +
open window + open window + + Now navigate to file_iframe_sandbox_k_if1.html to do tests for a sandbox opening a window + when only "allow-scripts allow-popups" are specified. + navigate to if1 + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_k_if9.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_k_if9.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,20 @@ + + + + + Test for Bug 949435 + + + + + + + I'm a window opened from the sandboxed document of file_iframe_sandbox_k_if8.html. + I should be able to call ok_wrapper in main test page directly because I should be same-origin with it. + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_window_form_fail.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_window_form_fail.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,20 @@ + + + + + Test for Bug 949435 + + + + + I should NOT be loaded by a form submit from a window opened from a sandbox without 'allow-forms'. + + + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_window_form_pass.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_window_form_pass.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,20 @@ + + + + + Test for Bug 949435 + + + + + + + I should be loaded by a form submit from a window opened from a sandbox with 'allow-forms allow-same-origin'. + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_window_navigation_fail.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_window_navigation_fail.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,20 @@ + + + + + Test for Bug 949435 + + + + + + +FAIL + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_window_navigation_pass.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_window_navigation_pass.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,20 @@ + + + + + Test for Bug 949435 + + + + + + +PASS + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_window_top_navigation_fail.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_window_top_navigation_fail.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,24 @@ + + + + + Test for Bug 949435 + + + + +FAIL + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/file_iframe_sandbox_window_top_navigation_pass.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/file_iframe_sandbox_window_top_navigation_pass.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,20 @@ + + + + + Test for Bug 949435 + + + + + + + I am navigated to from a window opened from a sandbox with allow-top-navigation. + + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/test_iframe_sandbox_modal.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/test_iframe_sandbox_modal.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,124 @@ + + + + + + Tests for Bug 949435 + + + + + + + +Mozilla Bug 766282 - implement allow-popups directive for iframe sandbox +

+
+ + + + + +
diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/test_iframe_sandbox_popups.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/test_iframe_sandbox_popups.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,80 @@ + + + + + + Tests for Bug 949435 + + + + + + +Mozilla Bug 766282 - Implementation Proposal for SVG iframe element : sandbox allow-popups directive test +

+
+ + + +
+ + diff -r ac8b0a19779d -r 88ddde390756 content/svg/content/test/test_iframe_sandbox_popups_inheritance.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/svg/content/test/test_iframe_sandbox_popups_inheritance.html Wed Feb 19 06:37:41 2014 +0900 @@ -0,0 +1,159 @@ + + + + + + + Tests for Bug 949435 + + + + + + + +Mozilla Bug 949435 - Implementation Proposal for SVG iframe element : sandbox allow-popuos directive inheritance tests +

+
+ + + + +
+ +