mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +01:00
Update web-platform-tests to revision 4a5223502fa660ce03e470af6a61c8bc26c5a8ee
This commit is contained in:
parent
c5f7c9ccf3
commit
e891345f26
1328 changed files with 36632 additions and 20588 deletions
|
@ -6,34 +6,19 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/nfc_help.js"></script>
|
||||
|
||||
<h2>Note</h2>
|
||||
<ol>
|
||||
<li>
|
||||
Run test is an insecure context, e.g. http://example.com/
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<div id="log"></div>
|
||||
|
||||
<script>
|
||||
|
||||
"use strict";
|
||||
|
||||
promise_test(t => {
|
||||
return promise_rejects(t, 'SecurityError', navigator.nfc.push(test_text_data));
|
||||
}, "nfc.push should fail with SecurityError in an insecure context.");
|
||||
|
||||
promise_test(t => {
|
||||
return promise_rejects(t, 'SecurityError', navigator.nfc.cancelPush());
|
||||
}, "nfc.cancelPush should fail with SecurityError in an insecure context.");
|
||||
|
||||
promise_test(t => {
|
||||
return promise_rejects(t, 'SecurityError', navigator.nfc.watch(noop));
|
||||
}, "nfc.watch should fail with SecurityError in an insecure context.");
|
||||
|
||||
promise_test(t => {
|
||||
return promise_rejects(t, 'SecurityError', navigator.nfc.cancelWatch());
|
||||
}, "nfc.cancelWatch should fail with SecurityError in an insecure context.");
|
||||
test(t => {
|
||||
assert_false(isSecureContext);
|
||||
assert_false('nfc' in navigator);
|
||||
}, 'navigator.nfc requires a secure context');
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue