Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Unified Diff: LayoutTests/fast/events/hit-test-cache-iframes.html

Issue 1242593004: Fix invalidity in HitTestCache with LayoutParts. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make clearHitTestCache recursive Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/events/hit-test-cache-iframes-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/hit-test-cache-iframes.html
diff --git a/LayoutTests/fast/events/hit-test-cache-iframes.html b/LayoutTests/fast/events/hit-test-cache-iframes.html
new file mode 100644
index 0000000000000000000000000000000000000000..2f11f2192d60e796950ca200f60fd2d234f1ca52
--- /dev/null
+++ b/LayoutTests/fast/events/hit-test-cache-iframes.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<style>
+#myframe {
+ height: 35px;
+ width: 100px;
+}
+</style>
+
+<script src="../../resources/js-test.js"></script>
+<script>
+
+setPrintTestResultsLazily();
+window.jsTestIsAsync = true;
+
+description("Ensure hit test cache is cleared across iframes.");
+
+function loaded() {
+ document.body.insertAdjacentHTML('beforeend', '<iframe id="myframe" srcdoc="" onload="iFrameLoaded()"></iframe>');
+ doHit();
+}
+
+function iFrameLoaded() {
+ doHit();
+ document.getElementById('myframe').contentDocument.body.insertAdjacentHTML('beforeend', '<div>AAA</div>');
+ doHit();
+ finishJSTest();
+}
+
+function doHit() {
+ var rect = document.getElementById('myframe').getBoundingClientRect();
+ window.internals.elementFromPoint(document, rect.left + 8, rect.top + 8, false, false);
+ shouldBe("window.internals.hitTestCacheHits(document)", "0");
+}
+</script>
+<body onload="loaded()" />
« no previous file with comments | « no previous file | LayoutTests/fast/events/hit-test-cache-iframes-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698