Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <head> | 1 <head> |
| 2 <script src="../resources/js-test.js"></script> | 2 <script src="../resources/js-test.js"></script> |
| 3 <style> | 3 <style> |
| 4 body { | 4 body { |
| 5 /* Hide the horizontal-scrollbar so that clicking right at the | 5 /* Hide the horizontal-scrollbar so that clicking right at the |
| 6 bottom of the vertical scrollbar will trigger a scroll */ | 6 bottom of the vertical scrollbar will trigger a scroll */ |
| 7 overflow-x: hidden; | 7 overflow-x: hidden; |
| 8 } | 8 } |
| 9 #container { | 9 #container { |
| 10 /* The plugin is guaranteed not to be in the margin. */ | 10 /* The plugin is guaranteed not to be in the margin. */ |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 31 15); | 31 15); |
| 32 eventSender.mouseDown(); | 32 eventSender.mouseDown(); |
| 33 // Drag the thumb down but move off the thumb, the plugin shouldn't | 33 // Drag the thumb down but move off the thumb, the plugin shouldn't |
| 34 // receive any events because there shouldn't be any mouse capture. | 34 // receive any events because there shouldn't be any mouse capture. |
| 35 eventSender.mouseMoveTo(window.innerWidth - 20, window.innerHeight - 10) ; | 35 eventSender.mouseMoveTo(window.innerWidth - 20, window.innerHeight - 10) ; |
| 36 // A mouse up will be received because when dragging off a | 36 // A mouse up will be received because when dragging off a |
| 37 // scrollbar and releasing, it dispatches an event to the last | 37 // scrollbar and releasing, it dispatches an event to the last |
| 38 // element under the mouse. | 38 // element under the mouse. |
| 39 eventSender.mouseUp(); | 39 eventSender.mouseUp(); |
| 40 | 40 |
| 41 // TODO(bokan): This is wrong, if the scrollbar captures the input the | 41 // If the scrollbar captures the input the plugin shouldn't be receiving |
|
mustaq
2017/03/31 16:57:48
This comment is now irrelevant because the bug is
bokan
2017/03/31 20:07:00
Right, we should only have crbug references if the
| |
| 42 // plugin shouldn't be receiving events. crbug.com/636436. | 42 // events. crbug.com/636436. |
| 43 shouldBe('eventHistory.length', '2'); | 43 shouldBe('eventHistory.length', '0'); |
| 44 shouldBe('eventHistory[0]', '"plugin.mousedown"'); | |
| 45 shouldBe('eventHistory[1]', '"plugin.mouseup"'); | |
| 46 requestAnimationFrame(function() { | 44 requestAnimationFrame(function() { |
| 47 shouldBeTrue('window.scrollY > 0'); | 45 shouldBeTrue('window.scrollY > 0'); |
| 48 finishJSTest(); | 46 finishJSTest(); |
| 49 }); | 47 }); |
| 50 } | 48 } |
| 51 | 49 |
| 52 window.onload = function() { | 50 window.onload = function() { |
| 53 if (!window.eventSender || !window.internals) { | 51 if (!window.eventSender || !window.internals) { |
| 54 finishJSTest(); | 52 finishJSTest(); |
| 55 return; | 53 return; |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 76 }); | 74 }); |
| 77 plugin.addEventListener('mousemove', function(e) { | 75 plugin.addEventListener('mousemove', function(e) { |
| 78 if (startLogging) | 76 if (startLogging) |
| 79 eventHistory.push('plugin.mousemove'); | 77 eventHistory.push('plugin.mousemove'); |
| 80 }); | 78 }); |
| 81 d.appendChild(plugin); | 79 d.appendChild(plugin); |
| 82 | 80 |
| 83 runTest(); | 81 runTest(); |
| 84 } | 82 } |
| 85 </script> | 83 </script> |
| OLD | NEW |