1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/bugs/test_bug465263.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=465263 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 465263</title> 1.11 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.13 +</head> 1.14 +<body> 1.15 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=465263">Mozilla Bug 465263</a> 1.16 +<p id="display"> 1.17 + <iframe src="http://mochi.test:8888"></iframe> 1.18 + <iframe src="http://mochi.test:8888"></iframe> 1.19 + <iframe src="http://mochi.test:8888"></iframe> 1.20 + <iframe src="http://mochi.test:8888"></iframe> 1.21 +</p> 1.22 +<div id="content" style="display: none"> 1.23 + 1.24 +</div> 1.25 +<pre id="test"> 1.26 +<script type="application/javascript"> 1.27 + 1.28 +/** Test for Bug 465263 **/ 1.29 +SimpleTest.waitForExplicitFinish(); 1.30 +addLoadEvent(function() { 1.31 + window.frames[0].location.hash = ''; 1.32 + is(window.frames[0].location.href, "http://mochi.test:8888/#", 1.33 + "Should have '#' in href now"); 1.34 + window.frames[1].location.hash = '#'; 1.35 + is(window.frames[1].location.href, "http://mochi.test:8888/#", 1.36 + "Should have only one '#' in href"); 1.37 + window.frames[2].location.hash = 'foo'; 1.38 + is(window.frames[2].location.href, "http://mochi.test:8888/#foo", 1.39 + "Should have '#foo' in href"); 1.40 + window.frames[3].location.hash = '#foo'; 1.41 + is(window.frames[3].location.href, "http://mochi.test:8888/#foo", 1.42 + "Should have only one '#' in href here too"); 1.43 + SimpleTest.finish(); 1.44 +}); 1.45 + 1.46 + 1.47 + 1.48 + 1.49 +</script> 1.50 +</pre> 1.51 +</body> 1.52 +</html>