Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / autoscroll-in-overflow-hidden-html.html
bloba4672ecaa6209c2afcfa5f00184be52736d967b0
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script>
5 function log(msg)
7 document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
10 var iframe;
11 var iframeDocument;
12 var iframeScrollTopAfterAnchor = 0;
14 function test()
16 if (window.testRunner) {
17 testRunner.waitUntilDone();
18 testRunner.dumpAsText();
21 iframe = document.getElementById('NoScrolliFrame');
22 iframeDocument = iframe.contentDocument;
23 iframeScrollTopAfterAnchor = 0;
25 var clickme = iframeDocument.getElementById('clickme');
26 var x = iframe.offsetLeft + clickme.offsetLeft + 7;
27 var y = iframe.offsetTop + clickme.offsetTop + 7;
28 if (window.eventSender) {
29 eventSender.dragMode = false;
30 eventSender.mouseMoveTo(x, y);
31 eventSender.mouseDown();
32 eventSender.mouseUp();
34 setTimeout(autoscrollTestPart1, 0);
37 function autoscrollTestPart1()
39 iframeScrollTopAfterAnchor = iframeDocument.scrollingElement.scrollTop;
40 if (iframeDocument.scrollingElement.scrollTop == 0)
41 log("FAILED: anchor clicking within non-scrollable inner frame failed.");
43 if (window.eventSender) {
44 var textInIframe = iframeDocument.getElementById('textInFrame');
45 var x = iframe.offsetLeft + textInIframe.offsetLeft - iframeDocument.scrollingElement.scrollLeft + 7;
46 var y = iframe.offsetTop + textInIframe.offsetTop - iframeDocument.scrollingElement.scrollTop + 7;
47 eventSender.dragMode = false;
48 eventSender.mouseMoveTo(x, y);
49 eventSender.mouseDown();
50 eventSender.mouseMoveTo(x, y - 10);
51 y = iframe.offsetTop;
52 eventSender.mouseMoveTo(x, y - 5);
54 setTimeout(autoscrollTestPart2, 100);
57 function autoscrollTestPart2()
59 if (window.eventSender)
60 eventSender.mouseUp();
62 log("Document whose HTML or BODY tags have overflow:hidden should not autoscroll.");
63 if (iframeScrollTopAfterAnchor == iframeDocument.scrollingElement.scrollTop)
64 log("PASSED: the autoscroll has not happened.");
65 else
66 log("FAILED: the autoscroll has happened.");
68 if (window.testRunner)
69 testRunner.notifyDone();
71 </script>
72 </head>
73 <body onload="test()">
74 <iframe id="NoScrolliFrame" style="height: 150px; width: 150px" src="resources/big-page-with-overflow-hidden-and-anchor-scroll.html" ></iframe>
75 <div id="console"></div>
76 </body>
77 </html>