Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 5 | <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> |
michael@0 | 6 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
michael@0 | 7 | <script type="text/javascript" src="NavigationUtils.js"></script> |
michael@0 | 8 | <style type="text/css"> |
michael@0 | 9 | iframe { width: 90%; height: 50px; } |
michael@0 | 10 | </style> |
michael@0 | 11 | <script> |
michael@0 | 12 | window.onload = function () { |
michael@0 | 13 | document.getElementById('active').innerHTML = |
michael@0 | 14 | '<iframe src="http://test1.example.org:80/tests/docshell/test/navigation/navigate.html#parent.frames[0],location"></iframe>' + |
michael@0 | 15 | '<iframe src="http://test1.example.org:80/tests/docshell/test/navigation/navigate.html#child1,open"></iframe>' + |
michael@0 | 16 | '<iframe src="http://test1.example.org:80/tests/docshell/test/navigation/navigate.html#child2,form"></iframe>' + |
michael@0 | 17 | '<iframe src="http://test1.example.org:80/tests/docshell/test/navigation/navigate.html#child3,hyperlink"></iframe>'; |
michael@0 | 18 | |
michael@0 | 19 | xpcWaitForFinishedFrames(function() { |
michael@0 | 20 | isBlank(frames[0], "Should not be able to navigate off-domain sibling by setting location."); |
michael@0 | 21 | isBlank(frames[1], "Should not be able to navigate off-domain sibling by calling window.open."); |
michael@0 | 22 | isBlank(frames[2], "Should not be able to navigate off-domain sibling by submitting form."); |
michael@0 | 23 | isBlank(frames[3], "Should not be able to navigate off-domain sibling by targeted hyperlink."); |
michael@0 | 24 | |
michael@0 | 25 | xpcCleanupWindows(); |
michael@0 | 26 | SimpleTest.finish(); |
michael@0 | 27 | }, 4); |
michael@0 | 28 | } |
michael@0 | 29 | </script> |
michael@0 | 30 | </head> |
michael@0 | 31 | <body> |
michael@0 | 32 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=408052">Mozilla Bug 408052</a> |
michael@0 | 33 | <div id="frames"> |
michael@0 | 34 | <iframe name="child0" src="blank.html"></iframe> |
michael@0 | 35 | <iframe name="child1" src="blank.html"></iframe> |
michael@0 | 36 | <iframe name="child2" src="blank.html"></iframe> |
michael@0 | 37 | <iframe name="child3" src="blank.html"></iframe> |
michael@0 | 38 | </div> |
michael@0 | 39 | <div id="active"></div> |
michael@0 | 40 | <pre id="test"> |
michael@0 | 41 | <script type="text/javascript"> |
michael@0 | 42 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 43 | </script> |
michael@0 | 44 | </pre> |
michael@0 | 45 | </body> |
michael@0 | 46 | </html> |