Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / hit-test-cache-iframes.html
blob2f11f2192d60e796950ca200f60fd2d234f1ca52
1 <!DOCTYPE html>
2 <style>
3 #myframe {
4 height: 35px;
5 width: 100px;
7 </style>
9 <script src="../../resources/js-test.js"></script>
10 <script>
12 setPrintTestResultsLazily();
13 window.jsTestIsAsync = true;
15 description("Ensure hit test cache is cleared across iframes.");
17 function loaded() {
18 document.body.insertAdjacentHTML('beforeend', '<iframe id="myframe" srcdoc="" onload="iFrameLoaded()"></iframe>');
19 doHit();
22 function iFrameLoaded() {
23 doHit();
24 document.getElementById('myframe').contentDocument.body.insertAdjacentHTML('beforeend', '<div>AAA</div>');
25 doHit();
26 finishJSTest();
29 function doHit() {
30 var rect = document.getElementById('myframe').getBoundingClientRect();
31 window.internals.elementFromPoint(document, rect.left + 8, rect.top + 8, false, false);
32 shouldBe("window.internals.hitTestCacheHits(document)", "0");
34 </script>
35 <body onload="loaded()" />