https://github.com/web-platform-tests/wpt
Raw File
Tip revision: da25c99886fb1a85fcf5a138bb8f337761c5aa7f authored by Anne van Kesteren on 06 June 2018, 09:55:14 UTC
move service worker into resources too
Tip revision: da25c99
nfc_recordType_json-manual.https.html
<!DOCTYPE html>
<meta charset=utf-8>
<title>Web NFC Test: push and watch json records</title>
<link rel="author" title="Intel" href="http://www.intel.com"/>
<link rel="help" href="https://w3c.github.io/web-nfc/"/>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/nfc_help.js"></script>
<meta name="flags" content="interact">

<p>Tap an NFC tag to the test device with NFC support.</p>

<p>Note: All the actions need to be done in 60 seconds, otherwise it will get TIMEOUT.</p>

<div id="log"></div>

<script>

"use strict";

setup({ explicit_timeout: true });

let desc = "Test that nfc.push and nfc.watch succeed when recordType is set to 'json'.";
let watchOptions = {
  recordType : "json",
  mediaType : "application/json",
  url : ""
}
let message = createMessage([createJsonRecord(test_json_data)]);

testNFCMessage(message, watchOptions, desc);

</script>
back to top