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

Side by Side Diff: LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash.html

Issue 894913002: Prevent default actions for JS-generated mouse events other than click (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: TIL, gclient sync may rebase changes back in time Created 5 years, 6 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 | LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash-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
1 <select id="bomb" onfocus="this.parentNode.removeChild(this)"> 1 <select id="bomb" onfocus="this.parentNode.removeChild(this)">
2 <option>Clicking on this select element should not crash</option> 2 <option>Clicking on this select element should not crash</option>
3 </select> 3 </select>
4 <h2>Layout test for <a href='https://bugs.webkit.org/show_bug.cgi?id=23858'>bug 23858</a></h2> 4 <h2>Layout test for <a href='https://bugs.webkit.org/show_bug.cgi?id=23858'>bug 23858</a></h2>
5 <p>If this page is displayed without crashing then the test has passed.</p> 5 <p>If the select can be clicked without crashing then the test has passed.</p>
6 <script> 6 <script>
7 if (window.testRunner) 7 if (window.testRunner)
8 testRunner.dumpAsText(); 8 testRunner.dumpAsText();
9 9
10 var select = document.getElementById('bomb'); 10 var select = document.getElementById('bomb');
11 var mouseEvent = document.createEvent("MouseEvents"); 11 var rect = select.getBoundingClientRect();
12 mouseEvent.initMouseEvent("mousedown", true, true, document.defaultView, 1, select.offsetLeft + 1, select.offsetTop + 1, select.offsetLeft + 1, select.offse tTop + 1, false, false, false, false, 0, document); 12 if (window.eventSender) {
13 select.dispatchEvent(mouseEvent); 13 eventSender.mouseMoveTo(rect.left + 1, rect.top + 1);
14 eventSender.mouseDown(0);
15 }
14 </script> 16 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/HTMLSelectElement/remove-element-from-within-focus-handler-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698