Skip to content

Commit

Permalink
Bug 1523562 [wpt PR 15016] - Add assert descriptions to Web Locks tes…
Browse files Browse the repository at this point in the history
…t to aid debugging, a=testonly

Automatic update from web-platform-tests
Add assert descriptions to Web Locks test to aid debugging (#15016)

For web-platform-tests/wpt#15015.
--

wpt-commits: 4ac3172e8d86ade4a9ded497bd10a1124fc6e231
wpt-pr: 15016
  • Loading branch information
foolip authored and jgraham committed Feb 5, 2019
1 parent 1c67063 commit 3a7f6e1
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ promise_test(async t => {

// Verify the request is enqueued:
const state = await navigator.locks.query();
assert_equals(state.held.filter(lock => lock.name === res).length, 1);
assert_equals(state.pending.filter(lock => lock.name === res).length, 1);
assert_equals(state.held.filter(lock => lock.name === res).length, 1,
'Number of held locks');
assert_equals(state.pending.filter(lock => lock.name === res).length, 1,
'Number of pending locks');

const rejected = promise_rejects(
t, 'AbortError', promise, 'Request should reject with AbortError');
Expand All @@ -76,8 +78,10 @@ promise_test(async t => {

// Verify the request is enqueued:
const state = await navigator.locks.query();
assert_equals(state.held.filter(lock => lock.name === res).length, 1);
assert_equals(state.pending.filter(lock => lock.name === res).length, 1);
assert_equals(state.held.filter(lock => lock.name === res).length, 1,
'Number of held locks');
assert_equals(state.pending.filter(lock => lock.name === res).length, 1,
'Number of pending locks');

const rejected = promise_rejects(
t, 'AbortError', promise, 'Request should reject with AbortError');
Expand Down

0 comments on commit 3a7f6e1

Please sign in to comment.