[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.22
[framework/web/webkit-efl.git] / LayoutTests / fast / events / attempt-scroll-with-no-scrollbars.html
1 <html><head>
2 <script>
3 var theWinref;
4
5 function test()
6 {
7     if (window.layoutTestController) {
8         layoutTestController.setCanOpenWindows();
9         layoutTestController.waitUntilDone();
10         layoutTestController.dumpAsText();
11     }
12     theWinref = window.open('','_blank','scrollbars=no');
13     setTimeout(doNewWindow, 250);
14     setTimeout(printResult, 750);
15 }
16
17 function doNewWindow()
18 {
19     theWinref.document.open();
20     theWinref.document.write("<html><body><iframe height='100%' width='100%' src=''></iframe><div>If you can see this, the test has failed.</div></body></html>");
21     theWinref.resizeTo(200,100);
22     theWinref.document.close();
23     theWinref.scrollTo(200,100);
24 }
25
26 function printResult()
27 {
28     if (theWinref.document.body.scrollTop == 0)
29         document.getElementById("console").innerHTML = "PASSED";
30     else
31         document.getElementById("console").innerHTML = "FAILED - window should not have been scrolled but was scrolled to " + theWinref.document.body.scrollTop;
32     theWinref.close();
33     endTest();
34 }
35
36 function endTest()
37 {
38     if (window.layoutTestController) {
39         if (theWinref.closed)
40             layoutTestController.notifyDone();
41         else
42             setTimeout("endTest()", 10);
43     }
44 }
45
46 </script>
47 </head>
48 <body onload="test();">
49 <div id="console">
50 NOT DONE YET
51 </div>
52 </body>
53 </html>