Skip to content

Commit

Permalink
Migrate isInputPending options class to dictionary
Browse files Browse the repository at this point in the history
Updates the API for isInputPending and associated tests to accept a dictionary
object for parameterization directly, making it compliant with the updated
spec.

Bug: 910421
Change-Id: I39e569ee6215044a9b59a8834d19cac76915cb9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2425138
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Andrew Comminos <acomminos@fb.com>
Cr-Commit-Position: refs/heads/master@{#810490}
  • Loading branch information
acomminos authored and chromium-wpt-export-bot committed Sep 25, 2020
1 parent e963de4 commit 0c112f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
8 changes: 1 addition & 7 deletions interfaces/is-input-pending.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@
// (https://github.com/w3c/webref)
// Source: Early detection of input events (https://wicg.github.io/is-input-pending/)

dictionary IsInputPendingOptionsInit {
dictionary IsInputPendingOptions {
boolean includeContinuous = false;
};

[Exposed=Window]
interface IsInputPendingOptions {
constructor(optional IsInputPendingOptionsInit isInputPendingOptionsInit = {});
attribute boolean includeContinuous;
};

[Exposed=Window] interface Scheduling {
boolean isInputPending(optional IsInputPendingOptions isInputPendingOptions);
};
Expand Down
1 change: 0 additions & 1 deletion is-input-pending/idlharness.window.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ idl_test(
['html', 'dom'],
async idl_array => {
idl_array.add_objects({
IsInputPendingOptions: ['new IsInputPendingOptions'],
Scheduling: ['navigator.scheduling'],
});
}
Expand Down
4 changes: 2 additions & 2 deletions is-input-pending/resources/input-onmessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
onmessage = async e => {
if (e.data !== 'check-input') return;

const discreteOptions = new IsInputPendingOptions({ includeContinuous: false });
const continuousOptions = new IsInputPendingOptions({ includeContinuous: true });
const discreteOptions = { includeContinuous: false };
const continuousOptions = { includeContinuous: true };

// Use a reasonable time to wait after dispatching events, since we want to be
// able to test for cases where isInputPending returns false.
Expand Down

0 comments on commit 0c112f3

Please sign in to comment.