Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / elementsFromPoint / elementsFromPoint-iframes.html
blob812a45baf62e67b0e662353890c9e87932af56f3
1 <!DOCTYPE HTML>
2 <script src="../../../resources/js-test.js"></script>
3 <script src="resources/elementsFromPoint.js"></script>
4 <style>
5 html, body {
6 margin: 0;
7 padding: 0;
9 body {
10 height: 500px;
12 #iframe {
13 width: 200px;
14 height: 200px;
16 #iframeScrollbars {
17 position: absolute;
18 top: 0;
19 left: 0;
20 transform: translate(50px, 50px);
21 width: 150px;
22 height: 150px;
23 overflow-y: scroll;
24 overflow-x: scroll;
26 </style>
27 <iframe id="iframe" src="data:text/html,<div id='div' style='width: 100px; height: 100px; background: red'></div>"></iframe>
28 <iframe id="iframeScrollbars" src="data:text/html,<div id='big' style='width: 500px; height: 500px; background: blue;'></div><div id='div' style='position: absolute; top: 0; left: 0; width: 100px; height: 100px; background: green;'>"></iframe>
29 <div id="console"></div>
30 <script>
31 window.jsTestIsAsync = true;
33 if (window.testRunner)
34 testRunner.dumpAsText();
36 if (window.internals)
37 internals.settings.setMockScrollbarsEnabled(true);
39 onload = function() {
40 checkElementsFromPointFourCorners('document', 'iframe');
41 checkElementsFromPointFourCorners('document.getElementById(\'iframe\').contentDocument', 'document.getElementById(\'iframe\').contentDocument.getElementById(\'div\')');
42 checkElementsFromPointFourCorners('document', 'iframeScrollbars');
43 checkElementsFromPointFourCorners('document.getElementById(\'iframeScrollbars\').contentDocument', 'document.getElementById(\'iframeScrollbars\').contentDocument.getElementById(\'div\')');
45 // Ensure that elements outside the inner document's viewport are not returned.
46 shouldBeEqualToNumber('document.getElementById(\'iframeScrollbars\').contentDocument.elementsFromPoint(-1, -1).length', 0);
47 shouldBeEqualToNumber('document.getElementById(\'iframeScrollbars\').contentDocument.elementsFromPoint(1, 1).length', 2);
48 shouldBeEqualToNumber('document.getElementById(\'iframeScrollbars\').contentDocument.elementsFromPoint(500, 500).length', 0);
49 shouldBeEqualToNumber('document.getElementById(\'iframeScrollbars\').contentDocument.elementsFromPoint(140, 140).length', 0);
51 finishJSTest();
53 </script>