mirror of
https://github.com/servo/servo.git
synced 2025-08-30 09:38:19 +01:00
Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326
This commit is contained in:
parent
462c272380
commit
1f531f66ea
5377 changed files with 174916 additions and 84369 deletions
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Web NFC Test: insecure context</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com"/>
|
||||
<link rel="help" href="https://w3c.github.io/web-nfc/"/>
|
||||
<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.");
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue