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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties.html

Issue 1617863002: Set the correct pressure for pointer events based on force (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Win/OSX compile error Created 4 years, 11 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
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <script src="../../../resources/js-test.js"></script> 2 <script src="../../../resources/js-test.js"></script>
3 <script src="../resources/input-modifiers.js"></script> 3 <script src="../resources/input-modifiers.js"></script>
4 <style> 4 <style>
5 div.box { 5 div.box {
6 margin: 10px; 6 margin: 10px;
7 padding: 50px; 7 padding: 50px;
8 float: left; 8 float: left;
9 } 9 }
10 </style> 10 </style>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 function init() { 45 function init() {
46 var targetDiv = document.getElementById("target"); 46 var targetDiv = document.getElementById("target");
47 47
48 testEventList.forEach(function(eventName) { 48 testEventList.forEach(function(eventName) {
49 49
50 targetDiv.addEventListener(eventName, function(event) { 50 targetDiv.addEventListener(eventName, function(event) {
51 51
52 debug("Received " + event.type); 52 debug("Received " + event.type);
53 53
54 if (event.type.startsWith("pointer")) 54 if (event.type.startsWith("pointer")) {
55 lastPointerEvent = event; 55 lastPointerEvent = event;
56 else { 56 shouldBeEqualToNumber("event.pressure", event.buttons ? 0.5 : 0.0);
mustaq 2016/01/25 16:34:29 Please add 'pressure' in numericAttributes[] above
Navid Zolghadr 2016/01/25 20:26:50 Done.
57 } else {
57 shouldBeNonNull("lastPointerEvent"); 58 shouldBeNonNull("lastPointerEvent");
58 shouldBeEqualToString("lastPointerEvent.type", event.type.replace("mouse ", "pointer")); 59 shouldBeEqualToString("lastPointerEvent.type", event.type.replace("mouse ", "pointer"));
59 60
60 if (!checkKeyModifiers) { 61 if (!checkKeyModifiers) {
61 62
62 if (lastPointerEvent.type=="pointerenter" || lastPointerEvent.type=="p ointerleave") { 63 if (lastPointerEvent.type=="pointerenter" || lastPointerEvent.type=="p ointerleave") {
63 shouldBeFalse("lastPointerEvent.bubbles"); 64 shouldBeFalse("lastPointerEvent.bubbles");
64 shouldBeFalse("lastPointerEvent.cancelable"); 65 shouldBeFalse("lastPointerEvent.cancelable");
65 } else { 66 } else {
66 shouldBeTrue("lastPointerEvent.bubbles"); 67 shouldBeTrue("lastPointerEvent.bubbles");
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 eventSender.mouseMoveTo(rect.left - 5, rect.top - 5); 132 eventSender.mouseMoveTo(rect.left - 5, rect.top - 5);
132 } 133 }
133 134
134 init(); 135 init();
135 if (window.eventSender) 136 if (window.eventSender)
136 runTests(); 137 runTests();
137 else 138 else
138 debug("This test requires eventSender"); 139 debug("This test requires eventSender");
139 140
140 </script> 141 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698