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

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

Issue 1976603006: Set view property of pointer events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 7 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/pointerevents/mouse-pointer-event-properties-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 <!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>
11 11
12 <div id="target" class="box" style="background-color:red"> 12 <div id="target" class="box" style="background-color:red">
13 </div> 13 </div>
14 14
15 <div id="console"></div> 15 <div id="console"></div>
16 16
17 <script> 17 <script>
18 window.name = "mainWindow";
18 description("Verifies that pointer event parameters are correct when fired for m ouse events."); 19 description("Verifies that pointer event parameters are correct when fired for m ouse events.");
19 20
20 var testEventList = ["mouseenter", "mouseleave", "mouseover", "mouseout", "mouse up", "mousedown", "mousemove", 21 var testEventList = ["mouseenter", "mouseleave", "mouseover", "mouseout", "mouse up", "mousedown", "mousemove",
21 "pointerenter", "pointerleave", "pointerover", "pointerout", "pointerup", "pointerdown", "pointermove"]; 22 "pointerenter", "pointerleave", "pointerover", "pointerout", "pointerup", "pointerdown", "pointermove"];
22 var lastPointerEvents = []; 23 var lastPointerEvents = [];
23 24
24 var checkKeyModifiers = false; 25 var checkKeyModifiers = false;
25 26
26 var numericAttributes = [ 27 var numericAttributes = [
27 "clientX", 28 "clientX",
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 if (attribute == "width" || attribute == "height") 86 if (attribute == "width" || attribute == "height")
86 expectedValue = 1; 87 expectedValue = 1;
87 if (attribute == "pressure") { 88 if (attribute == "pressure") {
88 if (event.buttons == 0) 89 if (event.buttons == 0)
89 expectedValue = 0.0; 90 expectedValue = 0.0;
90 else 91 else
91 expectedValue = 0.5; 92 expectedValue = 0.5;
92 } 93 }
93 shouldBeEqualToNumber("lastPointerEvents[0]." + attribute, expectedV alue); 94 shouldBeEqualToNumber("lastPointerEvents[0]." + attribute, expectedV alue);
94 }); 95 });
96 shouldBeEqualToString("lastPointerEvents[0].view.name", "mainWindow");
95 97
96 } else { 98 } else {
97 99
98 forEachModifier(function(attr, modifierName) { 100 forEachModifier(function(attr, modifierName) {
99 var getModifierStateStr = ".getModifierState('" + modifierName + "') ;" 101 var getModifierStateStr = ".getModifierState('" + modifierName + "') ;"
100 if (eval("event" + getModifierStateStr)) 102 if (eval("event" + getModifierStateStr))
101 shouldBeTrue("lastPointerEvents[0]" + getModifierStateStr); 103 shouldBeTrue("lastPointerEvents[0]" + getModifierStateStr);
102 else 104 else
103 shouldBeFalse("lastPointerEvents[0]" + getModifierStateStr); 105 shouldBeFalse("lastPointerEvents[0]" + getModifierStateStr);
104 }); 106 });
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 eventSender.mouseMoveTo(rect.left - 5, rect.top - 5); 147 eventSender.mouseMoveTo(rect.left - 5, rect.top - 5);
146 } 148 }
147 149
148 init(); 150 init();
149 if (window.eventSender) 151 if (window.eventSender)
150 runTests(); 152 runTests();
151 else 153 else
152 debug("This test requires eventSender"); 154 debug("This test requires eventSender");
153 155
154 </script> 156 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-event-properties-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698