| OLD | NEW |
| 1 var All_Pointer_Events = [ | 1 var All_Pointer_Events = [ |
| 2 "pointerdown", | 2 "pointerdown", |
| 3 "pointerup", | 3 "pointerup", |
| 4 "pointercancel", | 4 "pointercancel", |
| 5 "pointermove", | 5 "pointermove", |
| 6 "pointerover", | 6 "pointerover", |
| 7 "pointerout", | 7 "pointerout", |
| 8 "pointerenter", | 8 "pointerenter", |
| 9 "pointerleave", | 9 "pointerleave", |
| 10 "gotpointercapture", | 10 "gotpointercapture", |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 }); | 83 }); |
| 84 | 84 |
| 85 | 85 |
| 86 // Check the pressure value | 86 // Check the pressure value |
| 87 // TA: 1.6, 1.7, 1.8 | 87 // TA: 1.6, 1.7, 1.8 |
| 88 test(function () { | 88 test(function () { |
| 89 // TA: 1.6 | 89 // TA: 1.6 |
| 90 assert_greater_than_equal(event.pressure, 0, "pressure is greater than o
r equal to 0"); | 90 assert_greater_than_equal(event.pressure, 0, "pressure is greater than o
r equal to 0"); |
| 91 assert_less_than_equal(event.pressure, 1, "pressure is less than or equa
l to 1"); | 91 assert_less_than_equal(event.pressure, 1, "pressure is less than or equa
l to 1"); |
| 92 | 92 |
| 93 if (event.type === "pointerup") { |
| 94 assert_equals(event.pressure, 0, "pressure is 0 during pointerup"); |
| 95 } |
| 93 | 96 |
| 94 // TA: 1.7, 1.8 | 97 // TA: 1.7, 1.8 |
| 95 if (event.pointerType === "mouse") { | 98 if (event.pointerType === "mouse") { |
| 96 if (event.buttons === 0) { | 99 if (event.buttons === 0) { |
| 97 assert_equals(event.pressure, 0, "pressure is 0 for mouse with n
o buttons pressed"); | 100 assert_equals(event.pressure, 0, "pressure is 0 for mouse with n
o buttons pressed"); |
| 98 } else { | 101 } else { |
| 99 assert_equals(event.pressure, 0.5, "pressure is 0.5 for mouse wi
th a button pressed"); | 102 assert_equals(event.pressure, 0.5, "pressure is 0.5 for mouse wi
th a button pressed"); |
| 100 } | 103 } |
| 101 } | 104 } |
| 102 }, pointerTestName + ".pressure value is valid"); | 105 }, pointerTestName + ".pressure value is valid"); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 } else { | 235 } else { |
| 233 document.getElementById('pointerTypeDescription').innerHTML = ""; | 236 document.getElementById('pointerTypeDescription').innerHTML = ""; |
| 234 } | 237 } |
| 235 resetTestState(); | 238 resetTestState(); |
| 236 } | 239 } |
| 237 | 240 |
| 238 | 241 |
| 239 function setup_pointerevent_test(testName, supportedPointerTypes) { | 242 function setup_pointerevent_test(testName, supportedPointerTypes) { |
| 240 return globalPointerEventTest = new MultiPointerTypeTest(testName, supportedP
ointerTypes); | 243 return globalPointerEventTest = new MultiPointerTypeTest(testName, supportedP
ointerTypes); |
| 241 } | 244 } |
| OLD | NEW |