mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-13 06:38:48 +02:00
Automatic update from web-platform-testsWeb Locks API: Run tests in additional globals Use the "META: global=" annotation to run the web-locks/ tests in shared and service workers, as appropriate. Change-Id: I1d6acd9b4e2932bf3a60b1e41285cbe74e3cb8ff Reviewed-on: https://chromium-review.googlesource.com/1208447 Commit-Queue: Victor Costan <pwnall@chromium.org> Reviewed-by: Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#590265} -- wpt-commits: 7d538d126b49411702cdd88354f520cdf9a65702 wpt-pr: 12860 --HG-- extra : rebase_source : 125cfaf5b02d72d5746aaeb894d27ef8da08c929 extra : source : 703c030316ba169ade809c83d901a58f1881677c
14 lines
542 B
JavaScript
14 lines
542 B
JavaScript
// META: title=Web Locks API: API not available in non-secure context
|
|
// META: global=window,dedicatedworker,sharedworker
|
|
|
|
'use strict';
|
|
|
|
test(t => {
|
|
assert_false(self.isSecureContext);
|
|
assert_false('locks' in navigator,
|
|
'navigator.locks is only present in secure contexts');
|
|
assert_false('LockManager' in self,
|
|
'LockManager is only present in secure contexts');
|
|
assert_false('Lock' in self,
|
|
'Lock interface is only present in secure contexts');
|
|
}, 'API presence in non-secure contexts');
|