docshell/test/navigation/test_sibling-matching-parent.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/docshell/test/navigation/test_sibling-matching-parent.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     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 +window.onload = function () {
    1.16 +  document.getElementById('active').innerHTML =
    1.17 +      '<iframe src="navigate.html#parent.frames[0],location"></iframe>' +
    1.18 +      '<iframe src="navigate.html#child1,open"></iframe>' +
    1.19 +      '<iframe src="navigate.html#child2,form"></iframe>' +
    1.20 +      '<iframe src="navigate.html#child3,hyperlink"></iframe>';
    1.21 +
    1.22 +  xpcWaitForFinishedFrames(function() {
    1.23 +    isNavigated(frames[0], "Should be able to navigate sibling with on-domain parent by setting location.");
    1.24 +    isNavigated(frames[1], "Should be able to navigate sibling with on-domain parent by calling window.open.");
    1.25 +    isNavigated(frames[2], "Should be able to navigate sibling with on-domain parent by submitting form.");
    1.26 +    isNavigated(frames[3], "Should be able to navigate sibling with on-domain parent by targeted hyperlink.");
    1.27 +
    1.28 +    xpcCleanupWindows();
    1.29 +    SimpleTest.finish();
    1.30 +  }, 4);
    1.31 +}
    1.32 +</script>
    1.33 +</head>
    1.34 +<body>
    1.35 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=408052">Mozilla Bug 408052</a>
    1.36 +<div id="frames">
    1.37 +<iframe name="child0" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
    1.38 +<iframe name="child1" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
    1.39 +<iframe name="child2" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
    1.40 +<iframe name="child3" src="http://test1.example.org:80/tests/docshell/test/navigation/blank.html"></iframe>
    1.41 +</div>
    1.42 +<div id="active"></div>
    1.43 +<pre id="test">
    1.44 +<script type="text/javascript">
    1.45 +SimpleTest.waitForExplicitFinish();
    1.46 +</script>
    1.47 +</pre>
    1.48 +</body>
    1.49 +</html>

mercurial