Ticket #8: scrollTop.html

File scrollTop.html, 835 bytes (added by Frederico Caldeira Knabben, 14 years ago)

Opera's scrollTop TC

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2<html><head>
3
4        <title>element.scrollTop</title>
5
6</head>
7<body>
8
9        <p>FAILED (This TC requires JavaScript enabled)</p>
10       
11
12        <p><a href="#">this is filler text</a>
13        <a id="toscana" href="#">this is filler text</a></p>
14
15
16        <script type="text/javascript">
17       
18        function test(){
19                log=document.getElementsByTagName('p')[0].firstChild;
20                passed = document.getElementById('toscana').scrollTop == 0;
21                if( ! passed ){
22                        log.data='FAILED: scrollTop of second link is  '+document.getElementById('toscana').scrollTop;
23                }else{
24                        log.data='PASSED: scrollTop of second link is   '+document.getElementById('toscana').scrollTop;
25                }
26                try{ if (window.opener && window.opener.rr){window.opener.rr(passed);}}catch(e){}
27        }
28        window.onload=test;
29        </script>
30
31</body></html>
32
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy