Bug 1523562 [wpt PR 15016] - Add assert descriptions to Web Locks test to aid debugging, a=testonly
authorPhilip Jägenstedt <philip@foolip.org>
Thu, 31 Jan 2019 18:59:43 +0000
changeset 458098 e277ba0e12c4903174a5014d0c5ed4ecc6607008
parent 458097 bdef78cbd41a17b0dd3a30a42fc11d28d870149c
child 458099 650980ad15afb61136a5d741a601bef982091b09
push id35518
push useropoprus@mozilla.com
push dateFri, 08 Feb 2019 09:55:14 +0000
treeherdermozilla-central@3a3e393396f4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1523562, 15016, 15015
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1523562 [wpt PR 15016] - Add assert descriptions to Web Locks test to aid debugging, a=testonly Automatic update from web-platform-tests Add assert descriptions to Web Locks test to aid debugging (#15016) For https://github.com/web-platform-tests/wpt/issues/15015. -- wpt-commits: 4ac3172e8d86ade4a9ded497bd10a1124fc6e231 wpt-pr: 15016
testing/web-platform/tests/web-locks/signal.tentative.https.any.js
--- a/testing/web-platform/tests/web-locks/signal.tentative.https.any.js
+++ b/testing/web-platform/tests/web-locks/signal.tentative.https.any.js
@@ -45,18 +45,20 @@ promise_test(async t => {
   const controller = new AbortController();
 
   const promise =
     navigator.locks.request(res, {signal: controller.signal},
                             t.unreached_func('callback should not run'));
 
   // 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');
 
   controller.abort();
 
   await rejected;
 
@@ -71,18 +73,20 @@ promise_test(async t => {
 
   const controller = new AbortController();
 
   const promise =
     navigator.locks.request(res, {signal: controller.signal}, lock => {});
 
   // 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');
 
   let callback_called = false;
   t.step_timeout(() => {
     callback_called = true;
     controller.abort();