Skip to content

Commit

Permalink
[pointerevents] Stabilize test
Browse files Browse the repository at this point in the history
Previously, this test conditionally declared a subtest, making it
difficult to compare results between browsers. Depending on the
implementation status, the results could be interpreted in a number of
ways:

- a failing single-page test
- a timed out single-page test
- a completed test with a single failing subtest
- a completed test with a single passing subtest

Refactor to explicitly opt-in to the single-page test feature and to
consistently report unexpected behavior via unhandled Promise rejections
and uncaught exceptions.
  • Loading branch information
jugglinmike authored and Hexcles committed Oct 16, 2019
1 parent 315d2d4 commit 3b1798b
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h4>

var captureGot = false;

setup({ explicit_done: true });
setup({ single_test: true });
add_completion_callback(showPointerTypes);

function run() {
Expand All @@ -49,9 +49,7 @@ <h4>
// When the setPointerCapture method is invoked, if the specified pointer is not in active button state, then the method must have no effect on subsequent pointer events.
// TA: 13.2
on_event(target0, "pointerout", function (event) {
test(function() {
assert_false(captureGot, "pointer capture is not set while button state is inactive")
}, "pointer capture is not set while button state is inactive");
assert_false(captureGot, "pointer capture is not set while button state is inactive")
// Make sure the test finishes after all the input actions are completed.
actions_promise.then( () => {
done();
Expand Down

0 comments on commit 3b1798b

Please sign in to comment.