Bug 1452643 [wpt PR 9763] - Update the budget-api IDL file, a=testonly
authorLuke Bjerring <lukebjerring@users.noreply.github.com>
Mon, 09 Apr 2018 22:21:47 +0000
changeset 467305 afcb983aca195d7fda05182201295c3e86415c08
parent 467304 47fce569cd3bd931c0d020f634b781904d720e42
child 467306 9ccee37f78cc92f907ca0f82849ec47b3f2322f1
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1452643
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 1452643 [wpt PR 9763] - Update the budget-api IDL file, a=testonly Automatic update from web-platform-testsUpdate the budget-api IDL file (#9763) * Add budget-api idl file wpt-commits: 67c2a8716f759462e96f384d3f207a5e1b8b3add wpt-pr: 9763 wpt-commits: 67c2a8716f759462e96f384d3f207a5e1b8b3add wpt-pr: 9763
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/budget-api/interfaces.any.js
testing/web-platform/tests/interfaces/budget-api.idl
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -286188,16 +286188,21 @@
      {}
     ]
    ],
    "interfaces/background-fetch.idl": [
     [
      {}
     ]
    ],
+   "interfaces/budget-api.idl": [
+    [
+     {}
+    ]
+   ],
    "interfaces/clipboard-apis.idl": [
     [
      {}
     ]
    ],
    "interfaces/console.idl": [
     [
      {}
@@ -309272,16 +309277,26 @@
    "bluetooth/service/getCharacteristics/gen-service-is-removed.https.html": [
     [
      "/bluetooth/service/getCharacteristics/gen-service-is-removed.https.html",
      {
       "testdriver": true
      }
     ]
    ],
+   "budget-api/interfaces.any.js": [
+    [
+     "/budget-api/interfaces.any.html",
+     {}
+    ],
+    [
+     "/budget-api/interfaces.any.worker.html",
+     {}
+    ]
+   ],
    "clear-site-data/navigation-insecure.html": [
     [
      "/clear-site-data/navigation-insecure.html",
      {}
     ]
    ],
    "clear-site-data/navigation.https.html": [
     [
@@ -403719,16 +403734,20 @@
   "bluetooth/service/getCharacteristics/gen-service-is-removed-with-uuid.https.html": [
    "d8e4257645340adfd45f069c4cebbc3ca88f2348",
    "testharness"
   ],
   "bluetooth/service/getCharacteristics/gen-service-is-removed.https.html": [
    "417d39a317f55a95180c806d28047c85dd959d65",
    "testharness"
   ],
+  "budget-api/interfaces.any.js": [
+   "7532e03a56725728052d4b5a973630e2b86686da",
+   "testharness"
+  ],
   "clear-site-data/navigation-insecure.html": [
    "97c069cf7c938e1ebdba3f243ad48369a7fb5542",
    "testharness"
   ],
   "clear-site-data/navigation.https.html": [
    "462ebc571ae718c9b34ed78e8798c9edfec18e8d",
    "testharness"
   ],
@@ -574595,16 +574614,20 @@
   "interfaces/ambient-light.idl": [
    "bdede54deab80b5465f904a9726ee86f1260858d",
    "support"
   ],
   "interfaces/background-fetch.idl": [
    "f2c8fc84af7bf785ba42f1398181e2ab08c3826a",
    "support"
   ],
+  "interfaces/budget-api.idl": [
+   "99f4eacad964a3ca3bcc034b48a2f4c4a2bd6f72",
+   "support"
+  ],
   "interfaces/clipboard-apis.idl": [
    "66b014c6a2ba5cd8e0fbc83081d4c16ac4d46d39",
    "support"
   ],
   "interfaces/console.idl": [
    "43ced34008dc73d05c79140d8dc33c60e2d9df3a",
    "support"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/budget-api/interfaces.any.js
@@ -0,0 +1,24 @@
+// META: script=/resources/WebIDLParser.js
+// META: script=/resources/idlharness.js
+
+'use strict';
+
+// See https://wicg.github.io/budget-api/
+
+promise_test(async () => {
+  const html = await fetch('/interfaces/html.idl').then(r => r.text());
+  const workers = await fetch('/interfaces/dedicated-workers.idl').then(r => r.text());
+  const idl = await fetch('/interfaces/budget-api.idl').then(r => r.text());
+
+  const idlArray = new IdlArray();
+  idlArray.add_untested_idls(html, { only: [
+    'Navigator',
+    'NavigatorContentUtils',
+    'NavigatorCookies',
+    'NavigatorPlugins',
+  ] });
+  idlArray.add_untested_idls(workers);
+  idlArray.add_idls(idl);
+  idlArray.test();
+  done();
+}, 'budget-api interfaces.');
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/interfaces/budget-api.idl
@@ -0,0 +1,31 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content of this file was automatically extracted from the budget-api spec.
+// See https://wicg.github.io/budget-api/
+
+[Exposed=Window]
+partial interface Navigator {
+    [SameObject] readonly attribute BudgetService budget;
+};
+
+[Exposed=Worker]
+partial interface WorkerNavigator {
+    [SameObject] readonly attribute BudgetService budget;
+};
+
+[Exposed=(Window,Worker)]
+interface BudgetService {
+    Promise<double> getCost(OperationType operation);
+    Promise<sequence<BudgetState>> getBudget();
+
+    Promise<boolean> reserve(OperationType operation);
+};
+
+[Exposed=(Window,Worker)]
+interface BudgetState {
+  readonly attribute double budgetAt;
+  readonly attribute DOMTimeStamp time;
+};
+
+enum OperationType {
+  "silent-push"
+};