Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add assert descriptions to Web Locks test to aid debugging #15016

Merged
merged 1 commit into from
Jan 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions web-locks/signal.tentative.https.any.js
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