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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerevent_pointerleave_pen-manual.html

Issue 2831933002: Make sure PointerEvents's isPrimary set correctly for stylus (Closed)
Patch Set: isprimary Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt_automation/pointerevents/pointerevent_pointerleave_pen-manual-automation.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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">
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt_automation/pointerevents/pointerevent_pointerleave_pen-manual-automation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698