Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: LayoutTests/http/tests/navigation/resources/frame-with-anchor-same-origin.html

Issue 25039006: document.documentElement.scrollTop/Left is zero (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: document.documentElement.scrollTop/Left is zero Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698