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

Side by Side Diff: LayoutTests/fast/dom/anchor-without-content.html

Issue 891523002: ScrollTopLeftInterop should not be marked experimental (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updates Created 5 years, 10 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <style> 5 <style>
6 .spacer { 6 .spacer {
7 line-height: 100em; 7 line-height: 100em;
8 } 8 }
9 </style> 9 </style>
10 </head> 10 </head>
11 <body> 11 <body>
12 <p> 12 <p>
13 This test verifies that links to anchors without content work as exp ected. 13 This test verifies that links to anchors without content work as exp ected.
14 </p> 14 </p>
15 15
16 <span> 16 <span>
17 <a id="goto-1" href="#block1">Block 1</a><br> 17 <a id="goto-1" href="#block1">Block 1</a><br>
18 <a id="goto-2" href="#block2">Block 2</a><br> 18 <a id="goto-2" href="#block2">Block 2</a><br>
19 </span> 19 </span>
20 20
21 <a name="block1"></a><span class="h">Block 1</span><br> 21 <a name="block1"></a><span class="h">Block 1</span><br>
22 <span class="spacer"></span> 22 <span class="spacer"></span>
23 23
24 <a name="block2"></a><span class="h">Block 2</span><br> 24 <a name="block2"></a><span class="h">Block 2</span><br>
25 <span class="spacer"></span> 25 <span class="spacer"></span>
26 26
27 <script> 27 <script>
28 var scrollTopBeforeClick = document.documentElement.scrollTop; 28 var scrollTopBeforeClick = document.body.scrollTop;
29 document.getElementById('goto-1').click(); 29 document.getElementById('goto-1').click();
30 if (document.documentElement.scrollTop > scrollTopBeforeClick) 30 if (document.body.scrollTop > scrollTopBeforeClick)
31 testPassed('Clicking link 1 scrolled to block 1.'); 31 testPassed('Clicking link 1 scrolled to block 1.');
32 else 32 else
33 testFailed('Clicking link 1 didn\'t scroll as expected.'); 33 testFailed('Clicking link 1 didn\'t scroll as expected.');
34 34
35 var scrollTopBeforeClick = document.documentElement.scrollTop; 35 var scrollTopBeforeClick = document.body.scrollTop;
36 document.getElementById('goto-2').click(); 36 document.getElementById('goto-2').click();
37 if (document.documentElement.scrollTop > scrollTopBeforeClick) 37 if (document.body.scrollTop > scrollTopBeforeClick)
38 testPassed('Clicking link 2 scrolled to block 2.'); 38 testPassed('Clicking link 2 scrolled to block 2.');
39 else 39 else
40 testFailed('Clicking link 2 didn\'t scroll as expected.'); 40 testFailed('Clicking link 2 didn\'t scroll as expected.');
41 </script> 41 </script>
42 </body> 42 </body>
43 </html> 43 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698