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

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

Issue 2814343002: Fire a click event even when a clicked text node is removed in mouseup (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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/remove-text-node-in-mouseup-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <p>This test ensures Blink does fire a click event on the parent element of a cl icked text node
3 even when the text node has been removed in mouseup event.</p>
4 <div id="test"></div>
5 <div id="target" style="display:inline-block" onmouseup="mouseup()" onclick="tes t.innerHTML = 'PASS';">Click Here</div>
6 <script>
7 const test = document.getElementById('test');
8 const target = document.getElementById('target');
9
10 function mouseup() {
11 test.innerHTML = 'FAIL';
12 target.firstChild.remove();
13 }
14
15 if (window.testRunner) {
16 testRunner.dumpAsText();
17 if (!window.eventSender) {
18 test.innerHTML = 'FAIL - this test requires eventSender';
19 } else {
20 eventSender.mouseMoveTo(target.offsetLeft + target.offsetWidth / 2,
21 target.offsetTop + target.offsetHeight / 2);
22 eventSender.mouseDown();
23 eventSender.leapForward(200);
24 eventSender.mouseUp();
25 }
26 }
27 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/remove-text-node-in-mouseup-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698