| <!DOCTYPE html> |
| <script src="../resources/testharness.js"></script> |
| <script src="../resources/testharnessreport.js"></script> |
| <script> |
| test(function() { |
| assert_throws(new TypeError, function() { new NFC(); }, |
| 'the constructor should not be callable with "new"'); |
| assert_throws(new TypeError, function() { NFC(); }, |
| 'the constructor should not be callable'); |
| |
| // Test that navigator.nfc.push exists |
| assert_true('push' in navigator.nfc); |
| // Test that navigator.nfc.cancelPush exists |
| assert_true('cancelPush' in navigator.nfc); |
| // Test that navigator.nfc.watch exists |
| assert_true('watch' in navigator.nfc); |
| // Test that navigator.nfc.cancelWatch exists |
| assert_true('cancelWatch' in navigator.nfc); |
| }, 'NFC IDL test'); |
| </script> |