mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 1298255 - [Pointer Event] Update web-platform-test pointerevent_element_haspointercapture-manual.html. f=bevistseng r=smaug
This commit is contained in:
parent
2e47d34ebc
commit
1cf8ba2093
@ -35,7 +35,9 @@
|
||||
target1.setPointerCapture(e.pointerId);
|
||||
test_pointerEvent.step(function () {
|
||||
assert_equals(target0.hasPointerCapture(e.pointerId), false,
|
||||
"target1.setPointerCapture, target0.hasPointerCapture should be false");
|
||||
"after target1.setPointerCapture, target0.hasPointerCapture should be false");
|
||||
assert_equals(target1.hasPointerCapture(e.pointerId), true,
|
||||
"after target1.setPointerCapture, target1.hasPointerCapture should be true");
|
||||
});
|
||||
target0.setPointerCapture(e.pointerId);
|
||||
set_capture_to_target0 = true;
|
||||
@ -50,6 +52,8 @@
|
||||
test_pointerEvent.step(function () {
|
||||
assert_equals(target0.hasPointerCapture(e.pointerId), false,
|
||||
"after target0.releasePointerCapture, target0.hasPointerCapture should be false");
|
||||
assert_equals(target1.hasPointerCapture(e.pointerId), false,
|
||||
"after target0.releasePointerCapture, target1.hasPointerCapture should be false");
|
||||
});
|
||||
target0.setPointerCapture(e.pointerId);
|
||||
set_capture_to_target0 = true;
|
||||
@ -83,6 +87,13 @@
|
||||
assert_equals(target0.hasPointerCapture(e.pointerId), false,
|
||||
"pointerup target0.hasPointerCapture should be false");
|
||||
});
|
||||
});
|
||||
|
||||
on_event(target1, "pointerup", function (e) {
|
||||
test_pointerEvent.step(function () {
|
||||
assert_equals(target1.hasPointerCapture(e.pointerId), false,
|
||||
"pointerup target1.hasPointerCapture should be false");
|
||||
});
|
||||
test_pointerEvent.done();
|
||||
});
|
||||
}
|
||||
@ -95,14 +106,15 @@
|
||||
Test Description: This test checks if Element.hasPointerCapture returns value correctly
|
||||
<ol>
|
||||
<li> Press black rectangle and do not release
|
||||
<li> Move your pointer to yellow rectangle
|
||||
<li> Move your pointer to purple rectangle
|
||||
<li> Release the pointer
|
||||
<li> Click purple rectangle
|
||||
</ol>
|
||||
</h4>
|
||||
<p>
|
||||
-->
|
||||
<div id="target0" style="background:black"></div>
|
||||
<div id="target1" style="background:yellow"></div>
|
||||
<div id="target0" touch-action:none></div>
|
||||
<div id="target1" touch-action:none></div>
|
||||
<div id="complete-notice">
|
||||
<p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
|
||||
</div>
|
||||
|
@ -23,6 +23,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1000870
|
||||
sendMouseEvent(int_win, "target0", "mousemove", {button:0});
|
||||
sendMouseEvent(int_win, "target1", "mousemove", {button:0});
|
||||
sendMouseEvent(int_win, "target1", "mouseup", {button:0});
|
||||
sendMouseEvent(int_win, "target1", "mousedown", {button:0});
|
||||
sendMouseEvent(int_win, "target1", "mouseup", {button:0});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
@ -34,7 +34,9 @@
|
||||
target1.setPointerCapture(e.pointerId);
|
||||
test_pointerEvent.step(function () {
|
||||
assert_equals(target0.hasPointerCapture(e.pointerId), false,
|
||||
"target1.setPointerCapture, target0.hasPointerCapture should be false");
|
||||
"after target1.setPointerCapture, target0.hasPointerCapture should be false");
|
||||
assert_equals(target1.hasPointerCapture(e.pointerId), true,
|
||||
"after target1.setPointerCapture, target1.hasPointerCapture should be true");
|
||||
});
|
||||
target0.setPointerCapture(e.pointerId);
|
||||
set_capture_to_target0 = true;
|
||||
@ -49,6 +51,8 @@
|
||||
test_pointerEvent.step(function () {
|
||||
assert_equals(target0.hasPointerCapture(e.pointerId), false,
|
||||
"after target0.releasePointerCapture, target0.hasPointerCapture should be false");
|
||||
assert_equals(target1.hasPointerCapture(e.pointerId), false,
|
||||
"after target0.releasePointerCapture, target1.hasPointerCapture should be false");
|
||||
});
|
||||
target0.setPointerCapture(e.pointerId);
|
||||
set_capture_to_target0 = true;
|
||||
@ -82,6 +86,13 @@
|
||||
assert_equals(target0.hasPointerCapture(e.pointerId), false,
|
||||
"pointerup target0.hasPointerCapture should be false");
|
||||
});
|
||||
});
|
||||
|
||||
on_event(target1, "pointerup", function (e) {
|
||||
test_pointerEvent.step(function () {
|
||||
assert_equals(target1.hasPointerCapture(e.pointerId), false,
|
||||
"pointerup target1.hasPointerCapture should be false");
|
||||
});
|
||||
test_pointerEvent.done();
|
||||
});
|
||||
}
|
||||
@ -93,13 +104,14 @@
|
||||
Test Description: This test checks if Element.hasPointerCapture returns value correctly
|
||||
<ol>
|
||||
<li> Press black rectangle and do not release
|
||||
<li> Move your pointer to yellow rectangle
|
||||
<li> Move your pointer to purple rectangle
|
||||
<li> Release the pointer
|
||||
<li> Click purple rectangle
|
||||
</ol>
|
||||
</h4>
|
||||
<p>
|
||||
<div id="target0" style="background:black"></div>
|
||||
<div id="target1" style="background:yellow"></div>
|
||||
<div id="target0" touch-action:none></div>
|
||||
<div id="target1" touch-action:none></div>
|
||||
<div id="complete-notice">
|
||||
<p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user