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

Unified Diff: LayoutTests/fast/events/touch/touch-action-double-remove.html

Issue 647503002: Only unregister touch action handler conditionally (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reduced test case. Created 6 years, 2 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/touch/touch-action-double-remove-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/touch/touch-action-double-remove.html
diff --git a/LayoutTests/fast/events/touch/touch-action-double-remove.html b/LayoutTests/fast/events/touch/touch-action-double-remove.html
new file mode 100644
index 0000000000000000000000000000000000000000..3a7db617a4a11b8035af31ec9413261992c9bbaf
--- /dev/null
+++ b/LayoutTests/fast/events/touch/touch-action-double-remove.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<style>
+br {
+ touch-action: none;
+}
+</style>
+<!--
+This is a regression test against a double unregistration of a touch action
+event handler on a <br> element. When the document finishes loading and is
+attached to the view, all of its RenderObjects are destroyed and recreated. If
+a RenderObject had a touch action associated with it, it will need to remove
+the fake event handler it registered for it in the EventHandlerRegistry.
+However, when the document gets detached, all of the event handlers within it
+are automatically unregistered. When the RenderObject tries to unregister its
+own handler after the fact, it is no longer there and we hit an assertion
+failure.
+
+Note that this test doesn't use js-test.js because it also inadvertedly
+triggers the same bug by appending <br> elements to the document.
+
+The test passes if it doesn't trigger an assertion failure in a debug build.
+-->
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+PASS<br>
« no previous file with comments | « no previous file | LayoutTests/fast/events/touch/touch-action-double-remove-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698