Bug 1483517 [wpt PR 12497] - Update Feature Policy IDL file + test, a=testonly
authorPhilip Jägenstedt <philip@foolip.org>
Thu, 16 Aug 2018 21:57:21 +0000
changeset 487259 159231258afbf42f7aa9a2405aef940a33a859e7
parent 487258 163a3c25631321a7a96b23071594e9355c2c6c5b
child 487260 f072eabfc07d55d52ffde5cf2a9c0b08c36e7af0
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1483517, 12497
milestone63.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 1483517 [wpt PR 12497] - Update Feature Policy IDL file + test, a=testonly Automatic update from web-platform-testsUpdate Feature Policy IDL file + test (#12497) -- wpt-commits: af43e2eb32555059316b67fba4a1d7df6ea3148d wpt-pr: 12497
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/feature-policy/idlharness.window.js
testing/web-platform/tests/feature-policy/interfaces.any.js
testing/web-platform/tests/interfaces/feature-policy.idl
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -350317,23 +350317,19 @@
     ]
    ],
    "feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html": [
     [
      "/feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html",
      {}
     ]
    ],
-   "feature-policy/interfaces.any.js": [
-    [
-     "/feature-policy/interfaces.any.html",
-     {}
-    ],
-    [
-     "/feature-policy/interfaces.any.worker.html",
+   "feature-policy/idlharness.window.js": [
+    [
+     "/feature-policy/idlharness.window.html",
      {}
     ]
    ],
    "feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [
     [
      "/feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html",
      {}
     ]
@@ -584616,18 +584612,18 @@
   "feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html": [
    "f15b43576f2cac9b3245a9a52bc825c8d6b2f693",
    "testharness"
   ],
   "feature-policy/feature-policy-nested-header-policy-disallowed-for-all.https.sub.html.sub.headers": [
    "961d40336aeb3ed04c58b9a8b6196b3393cb92d5",
    "support"
   ],
-  "feature-policy/interfaces.any.js": [
-   "baebc2ff0c86e2eafe92811df9e41f2d67eb7662",
+  "feature-policy/idlharness.window.js": [
+   "fb17cab982acecdb7d8aadcc02544bc7cae1a2bb",
    "testharness"
   ],
   "feature-policy/payment-allowed-by-feature-policy-attribute-redirect-on-load.https.sub.html": [
    "daa2aa182daed73bd51bf32cf7981a805e3956c8",
    "testharness"
   ],
   "feature-policy/payment-allowed-by-feature-policy-attribute.https.sub.html": [
    "eeebe399acf53c1099a99455412e5baaada9d3ba",
@@ -605989,17 +605985,17 @@
    "61e869367a113092bd8c2ccf475da4fab9414b54",
    "support"
   ],
   "interfaces/entries-api.idl": [
    "71e80c717b2becc9a005e471553910a26fd0a326",
    "support"
   ],
   "interfaces/feature-policy.idl": [
-   "34d92778624f4ea314a2ab2dfc146bc8da51df3d",
+   "de2f0464683394194f347c7155c38ad48bfc190c",
    "support"
   ],
   "interfaces/fetch.idl": [
    "e86a282534b83a1a78e4911ed15e2e2d0cbe4967",
    "support"
   ],
   "interfaces/filter-effects.idl": [
    "16e6f0a546902e155d398c8225216f4525a4ae4b",
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/feature-policy/idlharness.window.js
@@ -0,0 +1,18 @@
+// META: script=/resources/WebIDLParser.js
+// META: script=/resources/idlharness.js
+
+"use strict";
+
+// https://wicg.github.io/feature-policy/
+
+idl_test(
+  ['feature-policy'],
+  ['reporting', 'html', 'dom'],
+  idl_array => {
+    idl_array.add_objects({
+      Document: ['document'],
+      HTMLIframeElement: ['document.createElement("iframe")'],
+      Policy: ['document.policy'],
+    })
+  }
+);
deleted file mode 100644
--- a/testing/web-platform/tests/feature-policy/interfaces.any.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// META: script=/resources/WebIDLParser.js
-// META: script=/resources/idlharness.js
-
-"use strict";
-
-// https://wicg.github.io/feature-policy/
-
-var idlArray = new IdlArray();
-
-function doTest(idl) {
-  idlArray.add_untested_idls("interface HTMLIFrameElement {};");
-  idlArray.add_idls(idl);
-  idlArray.add_objects({
-    HTMLIframeElement: ['document.createElement("iframe")'],
-  })
-  idlArray.test();
-  done();
-}
-
-promise_test(function () {
-  return fetch("/interfaces/feature-policy.idl").then(response => response.text())
-    .then(doTest);
-}, "Test interfaces");
--- a/testing/web-platform/tests/interfaces/feature-policy.idl
+++ b/testing/web-platform/tests/interfaces/feature-policy.idl
@@ -1,8 +1,27 @@
 // GENERATED CONTENT - DO NOT EDIT
-// Content of this file was automatically extracted from the
-// "Feature Policy" spec.
-// See: https://wicg.github.io/feature-policy/
+// Content was automatically extracted by Reffy into reffy-reports
+// (https://github.com/tidoust/reffy-reports)
+// Source: Feature Policy (https://wicg.github.io/feature-policy/)
+
+[NoInterfaceObject]
+interface Policy {
+  boolean allowsFeature(DOMString feature, optional DOMString origin);
+  sequence<DOMString> allowedFeatures();
+  sequence<DOMString> getAllowlistForFeature(DOMString feature);
+};
+
+partial interface Document {
+    [SameObject] readonly attribute Policy policy;
+};
 
 partial interface HTMLIFrameElement {
-    [CEReactions] attribute DOMString allow;
+    [SameObject] readonly attribute Policy policy;
 };
+interface FeaturePolicyViolationReportBody : ReportBody {
+  readonly attribute DOMString featureId;
+  readonly attribute DOMString message;
+  readonly attribute DOMString? sourceFile;
+  readonly attribute long? lineNumber;
+  readonly attribute long? columnNumber;
+  readonly attribute DOMString disposition;
+};