docshell/test/navigation/test_child.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docshell/test/navigation/test_child.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +<head>
     1.7 +    <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>        
     1.8 +    <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
     1.9 +    <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    1.10 +    <script type="text/javascript" src="NavigationUtils.js"></script>        
    1.11 +    <style type="text/css">
    1.12 +      iframe { width: 90%; height: 50px; }
    1.13 +    </style>
    1.14 +<script>
    1.15 +if (!navigator.platform.startsWith("Win")) {
    1.16 +  SimpleTest.expectAssertions(0, 1);
    1.17 +}
    1.18 +
    1.19 +window.onload = function() {
    1.20 +  navigateByLocation(frames[0]);
    1.21 +  navigateByOpen("child1");
    1.22 +  navigateByForm("child2");
    1.23 +  navigateByHyperlink("child3");
    1.24 +
    1.25 +  xpcWaitForFinishedFrames(function() {
    1.26 +    isNavigated(frames[0], "Should be able to navigate off-domain child by setting location.");
    1.27 +    isNavigated(frames[1], "Should be able to navigate off-domain child by calling window.open.");
    1.28 +    isNavigated(frames[2], "Should be able to navigate off-domain child by submitting form.");
    1.29 +    isNavigated(frames[3], "Should be able to navigate off-domain child by targeted hyperlink.");
    1.30 +
    1.31 +    xpcCleanupWindows();
    1.32 +    SimpleTest.finish();
    1.33 +  }, 4);
    1.34 +}
    1.35 +</script>
    1.36 +</head>
    1.37 +<body>
    1.38 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=408052">Mozilla Bug 408052</a>
    1.39 +<div id="frames">
    1.40 +<iframe name="child0" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
    1.41 +<iframe name="child1" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
    1.42 +<iframe name="child2" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
    1.43 +<iframe name="child3" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
    1.44 +</div>
    1.45 +<pre id="test">
    1.46 +<script type="text/javascript">
    1.47 +SimpleTest.waitForExplicitFinish();
    1.48 +</script>
    1.49 +</pre>
    1.50 +</body>
    1.51 +</html>

mercurial