Bug 1642163 - Make Web Locks tests check the API is implemented, r=annevk

This avoids needless timeouts

Differential Revision: https://phabricator.services.mozilla.com/D78689
This commit is contained in:
James Graham 2020-06-09 07:34:37 +00:00
parent 90eb219457
commit 545c620ab2
7 changed files with 25 additions and 15 deletions

View File

@ -1,23 +1,22 @@
[frames.tentative.https.html]
expected: TIMEOUT
[Window and Frame - shared mode]
expected: TIMEOUT
expected: FAIL
[Window and Frame - exclusive mode]
expected: NOTRUN
expected: FAIL
[Frame and Frame - exclusive mode]
expected: NOTRUN
expected: FAIL
[Terminated Frame with held lock]
expected: NOTRUN
expected: FAIL
[Navigated Frame with held lock]
expected: NOTRUN
expected: FAIL
[Navigated Frame with pending request]
expected: NOTRUN
expected: FAIL
[Removed Frame with pending request]
expected: NOTRUN
expected: FAIL

View File

@ -1,5 +1,4 @@
[query-ordering.tentative.https.html]
expected: TIMEOUT
[Requests appear in state in order made.]
expected: TIMEOUT
expected: FAIL

View File

@ -1,14 +1,13 @@
[workers.tentative.https.html]
expected: ERROR
[Window and Worker - shared mode]
expected: TIMEOUT
expected: FAIL
[Window and Worker - exclusive mode]
expected: NOTRUN
expected: FAIL
[Worker and Worker - exclusive mode]
expected: NOTRUN
expected: FAIL
[Terminated Worker - exclusive mode]
expected: NOTRUN
expected: FAIL

View File

@ -17,6 +17,7 @@ function nextMessage() {
}
promise_test(async t => {
assert_implements(navigator.locks);
const iframe_url = 'resources/sw-controlled-iframe.html';
// Register a service worker that will control an iframe.

View File

@ -10,6 +10,7 @@
'use strict';
promise_test(async t => {
assert_implements(navigator.locks);
const res = uniqueName(t);
const frame = await iframe('resources/iframe.html');
@ -25,6 +26,7 @@ promise_test(async t => {
}, 'Window and Frame - shared mode');
promise_test(async t => {
assert_implements(navigator.locks);
const res = uniqueName(t);
const frame = await iframe('resources/iframe.html');
@ -54,6 +56,7 @@ promise_test(async t => {
}, 'Window and Frame - exclusive mode');
promise_test(async t => {
assert_implements(navigator.locks);
const res = uniqueName(t);
const frame1 = await iframe('resources/iframe.html');
@ -86,6 +89,7 @@ promise_test(async t => {
}, 'Frame and Frame - exclusive mode');
promise_test(async t => {
assert_implements(navigator.locks);
const res = uniqueName(t);
const frame = await iframe('resources/iframe.html');
@ -114,6 +118,7 @@ promise_test(async t => {
}, 'Terminated Frame with held lock');
promise_test(async t => {
assert_implements(navigator.locks);
const res = uniqueName(t);
const frame = await iframe('resources/iframe.html');
@ -142,6 +147,7 @@ promise_test(async t => {
}, 'Navigated Frame with held lock');
promise_test(async t => {
assert_implements(navigator.locks);
const res = uniqueName(t);
// frame1 requests and holds res - should be granted immediately.
@ -190,6 +196,7 @@ promise_test(async t => {
}, 'Navigated Frame with pending request');
promise_test(async t => {
assert_implements(navigator.locks);
const res = uniqueName(t);
// frame1 requests and holds res - should be granted immediately.

View File

@ -42,6 +42,7 @@ function nextMessage() {
// distinguishable client_ids (otherwise it would not be possible to
// distinguish the requests and thus impossible to verify ordering).
promise_test(async testCase => {
assert_implements(navigator.locks);
const resourceName = uniqueName(testCase);
// Set up clients.

View File

@ -9,6 +9,7 @@
'use strict';
promise_test(async t => {
assert_implements(navigator.locks);
const worker = new Worker('resources/worker.js');
t.add_cleanup(() => { worker.terminate(); });
@ -24,6 +25,7 @@ promise_test(async t => {
}, 'Window and Worker - shared mode');
promise_test(async t => {
assert_implements(navigator.locks);
const worker = new Worker('resources/worker.js');
t.add_cleanup(() => { worker.terminate(); });
@ -55,6 +57,7 @@ promise_test(async t => {
}, 'Window and Worker - exclusive mode');
promise_test(async t => {
assert_implements(navigator.locks);
const worker1 = new Worker('resources/worker.js');
const worker2 = new Worker('resources/worker.js');
t.add_cleanup(() => { worker1.terminate(); worker2.terminate(); });
@ -87,6 +90,7 @@ promise_test(async t => {
}, 'Worker and Worker - exclusive mode');
promise_test(async t => {
assert_implements(navigator.locks);
const worker = new Worker('resources/worker.js');
const res = 'exclusive resource 3';