https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 4ecc44f58698cc889d8fe2a24152ab1cc0d48af4 authored by Geoffrey Sneddon on 09 April 2018, 13:16:33 UTC
Re-add logging for used port
Tip revision: 4ecc44f
nfc_insecure_context.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('nfc' in navigator);
}, 'navigator.nfc requires a secure context');

</script>
back to top