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

Unified Diff: LayoutTests/fast/events/move-event-handler-between-framehosts.html

Issue 225903009: Migrate touch events to EventHandlerRegistry (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix indendation problems (added by meld?) Created 6 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/move-event-handler-between-framehosts-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/move-event-handler-between-framehosts.html
diff --git a/LayoutTests/fast/events/move-event-handler-between-framehosts.html b/LayoutTests/fast/events/move-event-handler-between-framehosts.html
new file mode 100644
index 0000000000000000000000000000000000000000..579fea029028aacf87dbd8a4bb42188d97309e21
--- /dev/null
+++ b/LayoutTests/fast/events/move-event-handler-between-framehosts.html
@@ -0,0 +1,35 @@
+<html>
+<body onload="startTest()">
+
+<script src="../../resources/js-test.js"></script>
+<script>
+
+description("This test checks that moving an element with an event handler from one window (FrameHost) to another properly migrates the handler too.");
+
+var jsTestIsAsync = true;
+var window2;
+
+function window2Loaded() {
+ shouldBe('window.internals.scrollEventHandlerCount(document)', '0');
+ var div = window2.document.getElementById("div");
+ window.document.adoptNode(div);
+ window.document.body.appendChild(div);
+ shouldBe('window.internals.scrollEventHandlerCount(document)', '1');
+
+ window2.close();
+ finishJSTest();
+}
+
+function startTest() {
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.setCanOpenWindows();
+ }
+ window2 = window.open('data:text/html,<div id="div" onscroll="function() {}"></div>');
+ window2.addEventListener("load", window2Loaded, false);
+}
+
+</script>
+
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/events/move-event-handler-between-framehosts-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698