servo/tests/wpt/web-platform-tests/web-locks/non-secure-context.tentative.html

19 lines
720 B
HTML

<!DOCTYPE html>
<meta charset=utf-8>
<title>Web Locks API: API not available in non-secure context</title>
<link rel=help href="https://github.com/inexorabletash/web-locks">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
'use strict';
test(t => {
assert_false(window.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');
</script>