Index: third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerevent_pointerleave_pen-manual.html |
diff --git a/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerevent_pointerleave_pen-manual.html b/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerevent_pointerleave_pen-manual.html |
index 38a2f69792038edb14697abdd3da194e9018daf1..9d68b2162e30ae4b7272610fe6a19aa1897652b0 100644 |
--- a/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerevent_pointerleave_pen-manual.html |
+++ b/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerevent_pointerleave_pen-manual.html |
@@ -21,20 +21,32 @@ |
function run() { |
var target0 = document.getElementById("target0"); |
+ var count = 0; |
+ |
+ on_event(target0, "pointerenter", function (event) { |
+ test_pointerEvent.step(function () { |
+ assert_equals(event.pointerType, "pen", "Test should be run using a pen as input"); |
+ assert_equals(event.type, "pointerenter", "The " + event.type + " event was received"); |
+ assert_equals(event.isPrimary, true, "The " + event.type + ".isPrimary is true"); |
+ }); |
+ }); |
on_event(target0, "pointerleave", function (event) { |
detected_pointertypes[event.pointerType] = true; |
check_PointerEvent(event); |
+ count++; |
test_pointerEvent.step(function () { |
assert_equals(event.pointerType, "pen", "Test should be run using a pen as input"); |
assert_equals(event.type, "pointerleave", "The " + event.type + " event was received"); |
+ assert_equals(event.isPrimary, true, "The " + event.type + ".isPrimary is true"); |
assert_true((event.clientX > target0.getBoundingClientRect().left)&& |
(event.clientX < target0.getBoundingClientRect().right)&& |
(event.clientY > target0.getBoundingClientRect().top)&& |
(event.clientY < target0.getBoundingClientRect().bottom), |
"pointerleave should be received inside of target bounds"); |
}); |
- test_pointerEvent.done(); // complete test |
+ if (count >= 2) |
+ test_pointerEvent.done(); // complete test |
}); |
} |
</script> |
@@ -43,7 +55,7 @@ |
<h1>Pointer Event: Dispatch pointerleave (pen)</h1> |
<h4> |
Test Description: |
- When a pointing device that supports hover (pen stylus) leaves the range of the digitizer while over an element, the pointerleave event must be dispatched. |
+ When a pointing device that supports hover (pen stylus) leaves the range of the digitizer while over an element, the pointerleave event must be dispatched. In addition, all the pointer events' isPrimary should always be true when the pointing device leaves and enters the range of the digitizer again. |
</h4> |
<br /> |
<div id="target0"> |