Bug 1452482 [wpt PR 10360] - Adapt web-nfc IDL tests to latest spec, a=testonly
authorkaixinjxq <xiuqix.jiang@intel.com>
Mon, 09 Apr 2018 22:32:27 +0000
changeset 413739 0b7049a25f7590571b33fb445f3bb57054c92c9c
parent 413738 291cf72732db4c39939013dcf4376b0847c7965e
child 413740 2c288bfe481e9c0cd6d57d0bdec8e79061e4b7b3
push id102161
push userjames@hoppipolla.co.uk
push dateSun, 15 Apr 2018 09:10:16 +0000
treeherdermozilla-inbound@ebfad4be630d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1452482, 10360
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1452482 [wpt PR 10360] - Adapt web-nfc IDL tests to latest spec, a=testonly Automatic update from web-platform-testsAdapt web-nfc IDL tests to latest spec (#10360) wpt-commits: f16180450896438c055fe41c16a5d26593d15b6d wpt-pr: 10360 wpt-commits: f16180450896438c055fe41c16a5d26593d15b6d wpt-pr: 10360
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/interfaces/web-nfc.idl
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -574980,17 +574980,17 @@
    "8d00ee62fafedfd3e24925f48eed6ba26b5aafc7",
    "support"
   ],
   "interfaces/web-audio-api.idl": [
    "95feed20bd7d63ce1f3daea677e96340576eada9",
    "support"
   ],
   "interfaces/web-nfc.idl": [
-   "105e771bdd9587f029091a5ed590187ed6e86e2a",
+   "c81f70e3dd5a703ce38211227017a56a6262cadf",
    "support"
   ],
   "interfaces/web-share.idl": [
    "21b54128664c5962c29fd708ebba3d8d90987f26",
    "support"
   ],
   "interfaces/webauthn.idl": [
    "1ae8b428644479b352fd5b1996677fd4dcdbb84b",
--- a/testing/web-platform/tests/interfaces/web-nfc.idl
+++ b/testing/web-platform/tests/interfaces/web-nfc.idl
@@ -1,60 +1,63 @@
-
-      dictionary NFCMessage {
-        sequence<NFCRecord> records;
-        USVString url;
-      };
+dictionary NFCMessage {
+    sequence<NFCRecord> records;
+    USVString           url;
+};
 
-      typedef (DOMString or unrestricted double or ArrayBuffer or Dictionary) NFCRecordData;
+typedef (DOMString or unrestricted double or ArrayBuffer or Dictionary) NFCRecordData;
 
-      dictionary NFCRecord {
-        NFCRecordType recordType;
-        USVString mediaType;
-        NFCRecordData data;
-      };
+dictionary NFCRecord {
+    NFCRecordType recordType;
+    USVString     mediaType;
+    NFCRecordData data;
+};
 
-        enum NFCRecordType {
-          "empty",
-          "text",
-          "url",
-          "json",
-          "opaque"
-        };
+enum NFCRecordType {
+    "empty",
+    "text",
+    "url",
+    "json",
+    "opaque"
+};
 
-    partial interface Navigator {
-      readonly attribute NFC nfc;
-    };
+partial interface Navigator {
+    [SecureContext,
+     SameObject]
+    readonly attribute NFC nfc;
+};
 
-    typedef (DOMString or ArrayBuffer or NFCMessage) NFCPushMessage;
+typedef (DOMString or ArrayBuffer or NFCMessage) NFCPushMessage;
 
-    interface NFC {
-      Promise<void> push(NFCPushMessage message, optional NFCPushOptions options);
-      Promise<void> cancelPush(optional NFCPushTarget target="any");
-      Promise<long> watch(MessageCallback callback, optional NFCWatchOptions options);
-      Promise<void> cancelWatch(optional long id);
-    };
+[SecureContext]
+interface NFC {
+    Promise<void> push(NFCPushMessage message, optional NFCPushOptions options);
+    Promise<void> cancelPush(optional NFCPushTarget target = "any");
+    Promise<long> watch(MessageCallback callback,
+                        optional NFCWatchOptions options);
+    Promise<void> cancelWatch(optional long id);
+};
 
-    callback MessageCallback = void (NFCMessage message);
+callback MessageCallback = void (NFCMessage message);
 
-      dictionary NFCPushOptions {
-        NFCPushTarget target = "any";
-        unrestricted double timeout = Infinity;
-        boolean ignoreRead = true;
-      };
+dictionary NFCPushOptions {
+    NFCPushTarget       target = "any";
+    unrestricted double timeout = Infinity;
+    boolean             ignoreRead = true;
+};
 
-      enum NFCPushTarget {
-        "tag",
-        "peer",
-        "any"
-      };
+enum NFCPushTarget {
+    "tag",
+    "peer",
+    "any"
+};
 
-        dictionary NFCWatchOptions {
-          USVString url = "";
-          NFCRecordType? recordType;
-          USVString mediaType = "";
-          NFCWatchMode mode = "web-nfc-only";
-        };
+dictionary NFCWatchOptions {
+    USVString      url = "";
+    NFCRecordType? recordType;
+    USVString      mediaType = "";
+    NFCWatchMode   mode = "web-nfc-only";
+};
 
-      enum NFCWatchMode {
-        "web-nfc-only",
-        "any"
-      };
+enum NFCWatchMode {
+    "web-nfc-only",
+    "any"
+};