1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/docshell/test/navigation/test_opener.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,52 @@ 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("Linux")) { 1.16 + SimpleTest.expectAssertions(0, 1); 1.17 +} 1.18 + 1.19 +window.onload = function () { 1.20 + navigateByLocation(window0); 1.21 + navigateByOpen("window1"); 1.22 + navigateByForm("window2"); 1.23 + navigateByHyperlink("window3"); 1.24 + 1.25 + xpcWaitForFinishedFrames(function() { 1.26 + isNavigated(window0, "Should be able to navigate popup by setting location."); 1.27 + isNavigated(window1, "Should be able to navigate popup by calling window.open."); 1.28 + isNavigated(window2, "Should be able to navigate popup by submitting form."); 1.29 + isNavigated(window3, "Should be able to navigate popup by targeted hyperlink."); 1.30 + 1.31 + window0.close(); 1.32 + window1.close(); 1.33 + window2.close(); 1.34 + window3.close(); 1.35 + 1.36 + xpcCleanupWindows(); 1.37 + SimpleTest.finish(); 1.38 + }, 4); 1.39 +} 1.40 + 1.41 +var window0 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/blank.html", "window0", "width=10,height=10"); 1.42 +var window1 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/blank.html", "window1", "width=10,height=10"); 1.43 +var window2 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/blank.html", "window2", "width=10,height=10"); 1.44 +var window3 = window.open("http://test1.example.org:80/tests/docshell/test/navigation/blank.html", "window3", "width=10,height=10"); 1.45 +</script> 1.46 +</head> 1.47 +<body> 1.48 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=408052">Mozilla Bug 408052</a> 1.49 +<pre id="test"> 1.50 +<script type="text/javascript"> 1.51 +SimpleTest.waitForExplicitFinish(); 1.52 +</script> 1.53 +</pre> 1.54 +</body> 1.55 +</html>