|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=465263 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 465263</title> |
|
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
10 </head> |
|
11 <body> |
|
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=465263">Mozilla Bug 465263</a> |
|
13 <p id="display"> |
|
14 <iframe src="http://mochi.test:8888"></iframe> |
|
15 <iframe src="http://mochi.test:8888"></iframe> |
|
16 <iframe src="http://mochi.test:8888"></iframe> |
|
17 <iframe src="http://mochi.test:8888"></iframe> |
|
18 </p> |
|
19 <div id="content" style="display: none"> |
|
20 |
|
21 </div> |
|
22 <pre id="test"> |
|
23 <script type="application/javascript"> |
|
24 |
|
25 /** Test for Bug 465263 **/ |
|
26 SimpleTest.waitForExplicitFinish(); |
|
27 addLoadEvent(function() { |
|
28 window.frames[0].location.hash = ''; |
|
29 is(window.frames[0].location.href, "http://mochi.test:8888/#", |
|
30 "Should have '#' in href now"); |
|
31 window.frames[1].location.hash = '#'; |
|
32 is(window.frames[1].location.href, "http://mochi.test:8888/#", |
|
33 "Should have only one '#' in href"); |
|
34 window.frames[2].location.hash = 'foo'; |
|
35 is(window.frames[2].location.href, "http://mochi.test:8888/#foo", |
|
36 "Should have '#foo' in href"); |
|
37 window.frames[3].location.hash = '#foo'; |
|
38 is(window.frames[3].location.href, "http://mochi.test:8888/#foo", |
|
39 "Should have only one '#' in href here too"); |
|
40 SimpleTest.finish(); |
|
41 }); |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 </script> |
|
47 </pre> |
|
48 </body> |
|
49 </html> |