OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../js-test-resources/js-test-pre.js"></script> | 4 <script src="../../../js-test-resources/js-test-pre.js"></script> |
5 <script> | 5 <script> |
6 function runTest() { | 6 function runTest() { |
7 description('Tests that loading a same-origin frame with a URL that contai
ns an anchor fragment does scroll this frame.'); | 7 description('Tests that loading a same-origin frame with a URL that contai
ns an anchor fragment does scroll this frame.'); |
8 description('This tests that the framesniffing defenses are not overzealou
s.'); | 8 description('This tests that the framesniffing defenses are not overzealou
s.'); |
9 // Check scroll position in a timeout to make sure that the anchor has bee
n scrolled to. | 9 // Check scroll position in a timeout to make sure that the anchor has bee
n scrolled to. |
10 setTimeout(function() { | 10 setTimeout(function() { |
11 shouldBeTrue('document.body.scrollTop > 0'); | 11 shouldBeTrue('document.documentElement.scrollTop > 0'); |
12 shouldBeTrue('document.body.scrollLeft == 0'); | 12 shouldBeTrue('document.documentElement.scrollLeft == 0'); |
13 finishJSTest(); | 13 finishJSTest(); |
14 }, 0); | 14 }, 0); |
15 } | 15 } |
16 var jsTestIsAsync = true; | 16 var jsTestIsAsync = true; |
17 </script> | 17 </script> |
18 </head> | 18 </head> |
19 <body> | 19 <body> |
20 <!-- large same-origin grandchild frame --> | 20 <!-- large same-origin grandchild frame --> |
21 <iframe height="8000" width="8000" src="http://127.0.0.1:8000/navigation/resourc
es/grandchild-with-anchor.html#anchor1" name="grandchild" onload="runTest()"> | 21 <iframe height="8000" width="8000" src="http://127.0.0.1:8000/navigation/resourc
es/grandchild-with-anchor.html#anchor1" name="grandchild" onload="runTest()"> |
22 </iframe> | 22 </iframe> |
23 <script src="../../../js-test-resources/js-test-post.js"></script> | 23 <script src="../../../js-test-resources/js-test-post.js"></script> |
24 </body> | 24 </body> |
25 </html> | 25 </html> |
OLD | NEW |