OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../resources/testharness.js"></script> | 2 <script src="../resources/testharness.js"></script> |
3 <script src="../resources/testharnessreport.js"></script> | 3 <script src="../resources/testharnessreport.js"></script> |
4 <script> | 4 <script> |
5 test(function() { | 5 test(function() { |
6 assert_throws(null, function() { new NFC(); }, | 6 assert_throws(null, function() { new NFC(); }, |
7 'the constructor should not be callable with "new"'); | 7 'the constructor should not be callable with "new"'); |
8 assert_throws(null, function() { NFC(); }, | 8 assert_throws(null, function() { NFC(); }, |
9 'the constructor should not be callable'); | 9 'the constructor should not be callable'); |
| 10 |
| 11 // Test that navigator.nfc.push exists |
| 12 assert_true('push' in navigator.nfc); |
| 13 // Test that navigator.nfc.cancelPush exists |
| 14 assert_true('cancelPush' in navigator.nfc); |
| 15 // Test that navigator.nfc.watch exists |
| 16 assert_true('watch' in navigator.nfc); |
| 17 // Test that navigator.nfc.cancelWatch exists |
| 18 assert_true('cancelWatch' in navigator.nfc); |
10 }, 'NFC IDL test'); | 19 }, 'NFC IDL test'); |
11 </script> | 20 </script> |
OLD | NEW |