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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/remove-text-node-in-mouseup.html

Issue 2809333002: WIP Logging for Contextual Search: Node->Element. (Closed)
Patch Set: Created 3 years, 8 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
Index: third_party/WebKit/LayoutTests/fast/events/remove-text-node-in-mouseup.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/remove-text-node-in-mouseup.html b/third_party/WebKit/LayoutTests/fast/events/remove-text-node-in-mouseup.html
new file mode 100644
index 0000000000000000000000000000000000000000..66adaddc8f126c5668f27bc97386a53b5baf84eb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/events/remove-text-node-in-mouseup.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<p>This test ensures Blink does fire a click event on the parent element of a clicked text node
+even when the text node has been removed in mouseup event.</p>
+<div id="test"></div>
+<div id="target" style="display:inline-block" onmouseup="mouseup()" onclick="test.innerHTML = 'PASS';">Click Here</div>
+<script>
+const test = document.getElementById('test');
+const target = document.getElementById('target');
+
+function mouseup() {
+ test.innerHTML = 'FAIL';
+ target.firstChild.remove();
+}
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ if (!window.eventSender) {
+ test.innerHTML = 'FAIL - this test requires eventSender';
+ } else {
+ eventSender.mouseMoveTo(target.offsetLeft + target.offsetWidth / 2,
+ target.offsetTop + target.offsetHeight / 2);
+ eventSender.mouseDown();
+ eventSender.leapForward(200);
+ eventSender.mouseUp();
+ }
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698