mirror of
https://github.com/servo/servo.git
synced 2025-07-13 02:13:40 +01:00
29 lines
748 B
HTML
29 lines
748 B
HTML
<!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>
|
|
<script>
|
|
|
|
"use strict";
|
|
|
|
test(t => {
|
|
assert_false(isSecureContext);
|
|
assert_false('NFCWriter' in window);
|
|
}, 'NFCWriter requires a secure context');
|
|
|
|
test(t => {
|
|
assert_false(isSecureContext);
|
|
assert_false('NFCReader' in window);
|
|
}, 'NFCReader requires a secure context');
|
|
|
|
</script>
|