Skip to content

Commit

Permalink
Bug 1760236 [wpt PR 33208] - Docs: Add await to action.send() example…
Browse files Browse the repository at this point in the history
…s, a=testonly

Automatic update from web-platform-tests
Docs: Add await to action.send() examples

Add `await` to the actions.send examples in the docs to clarify
that `send()` returns a promise and is not synchronous.

Also fix a minor type in the testharness docs

--

wpt-commits: 6b3854bcc7027d37263a99fee2e5d36ee95568a1
wpt-pr: 33208
  • Loading branch information
recvfrom authored and moz-wptsync-bot committed Mar 26, 2022
1 parent 60b1e6b commit 2cf4605
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ let actions = new test_driver.Actions()
.setContext(frames[0])
.keyDown("p")
.keyUp("p");
actions.send();
await actions.send();
```

Note that if an action uses an element reference, the context will be
Expand Down
2 changes: 1 addition & 1 deletion testing/web-platform/tests/resources/testdriver-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* .keyDown("p")
* .keyUp("p");
*
* actions.send();
* await actions.send();
*
* @param {number} [defaultTickDuration] - The default duration of a
* tick. Be default this is set ot 16ms, which is one frame time
Expand Down
2 changes: 1 addition & 1 deletion testing/web-platform/tests/resources/testharness.js
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@
/**
* Create a promise test.
*
* Promise tests are tests which are represeted by a promise
* Promise tests are tests which are represented by a promise
* object. If the promise is fulfilled the test passes, if it's
* rejected the test fails, otherwise the test passes.
*
Expand Down

0 comments on commit 2cf4605

Please sign in to comment.