Skip to content

Commit

Permalink
[WebCryptoAPI] Remove race condition (web-platform-tests#14291)
Browse files Browse the repository at this point in the history
* [WebCryptoAPI] Remove race condition

Configure testharness.js to wait until the global `done` function is
invoked before reporting results. This ensures that all
asynchronously-declared tests are defined and subsequently executed
regardless of variations in timing.

* fixup! [WebCryptoAPI] Remove race condition
  • Loading branch information
jugglinmike authored and jimsch committed Dec 10, 2018
1 parent ee999c2 commit 8eab58f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions WebCryptoAPI/sign_verify/ecdsa.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

function run_test() {
setup({explicit_done: true});

var subtle = self.crypto.subtle; // Change to test prefixed implementations

// When are all these tests really done? When all the promises they use have resolved.
Expand Down
2 changes: 2 additions & 0 deletions WebCryptoAPI/sign_verify/hmac.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

function run_test() {
setup({explicit_done: true});

var subtle = self.crypto.subtle; // Change to test prefixed implementations

// When are all these tests really done? When all the promises they use have resolved.
Expand Down
2 changes: 2 additions & 0 deletions WebCryptoAPI/sign_verify/rsa.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

function run_test() {
setup({explicit_done: true});

var subtle = self.crypto.subtle; // Change to test prefixed implementations

// When are all these tests really done? When all the promises they use have resolved.
Expand Down

0 comments on commit 8eab58f

Please sign in to comment.