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

Side by Side Diff: LayoutTests/scrollbars/scrollbar-miss-mouseevents-if-document-preventdefaulted.html

Issue 309793003: Mainframe scrollbars should get events even if document prevent-defaults the mouse events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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/scrollbars/scrollbar-miss-mouseevents-if-document-preventdefaulted-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 <html>
2 <head>
3 <script>
4 document.addEventListener('mousedown', function (e) { e.preventDefault(); });
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 }
8 function runTest()
9 {
10 var container = document.getElementById("body");
11 container.scrollTop = 2;
12 if (window.eventSender) {
13 // Drag scrollbar thumber to top most:
14 eventSender.mouseMoveTo(document.body.clientWidth + 8, 40);
15 eventSender.mouseDown();
16 eventSender.mouseMoveTo(document.body.clientWidth + 8, 0);
17 eventSender.mouseUp();
18 document.getElementById('console').innerHTML
19 = container.scrollTop == 0 ? "PASS" : "FAIL";
20 }
21 }
22 </script>
23 </head>
24 <body onload="runTest();" style="margin: 0; height: 5000px;" id="body">
25 <p>Test for <a href="crbug.com/358248">bug358248</a>: This tests that mouse clic ks/releases/drags on main frame scrollbars work properly even if the document pr event-defaults the mouse events. On success, the scrollTop should be 0.<p/>
26 <div id="console"></div>
27 </body>
28 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/scrollbars/scrollbar-miss-mouseevents-if-document-preventdefaulted-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698