Add interfaces/idle-detection.idl and update test (#26414)
Closes https://github.com/web-platform-tests/wpt/pull/26360
diff --git a/idle-detection/idlharness.https.window.js b/idle-detection/idlharness.https.window.js
index 98c590f..6bbdfe5 100644
--- a/idle-detection/idlharness.https.window.js
+++ b/idle-detection/idlharness.https.window.js
@@ -8,7 +8,7 @@
'use strict';
idl_test(
- ['idle-detection.tentative'],
+ ['idle-detection'],
['dom', 'html'],
async (idl_array, t) => {
await test_driver.set_permission({ name: 'idle-detection' }, 'granted', false);
diff --git a/idle-detection/resources/idlharness-worker.js b/idle-detection/resources/idlharness-worker.js
index ba2ddfe..9733050 100644
--- a/idle-detection/resources/idlharness-worker.js
+++ b/idle-detection/resources/idlharness-worker.js
@@ -4,7 +4,7 @@
importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js");
idl_test(
- ['idle-detection.tentative'],
+ ['idle-detection'],
['dom', 'html'],
async (idl_array, t) => {
self.idle = new IdleDetector();
diff --git a/interfaces/idle-detection.idl b/interfaces/idle-detection.idl
new file mode 100644
index 0000000..0893ad3
--- /dev/null
+++ b/interfaces/idle-detection.idl
@@ -0,0 +1,31 @@
+// GENERATED CONTENT - DO NOT EDIT
+// Content was automatically extracted by Reffy into webref
+// (https://github.com/w3c/webref)
+// Source: Idle Detection API (https://wicg.github.io/idle-detection/)
+
+enum UserIdleState {
+ "active",
+ "idle"
+};
+
+enum ScreenIdleState {
+ "locked",
+ "unlocked"
+};
+
+dictionary IdleOptions {
+ [EnforceRange] unsigned long long threshold;
+ AbortSignal signal;
+};
+
+[
+ SecureContext,
+ Exposed=(Window,DedicatedWorker)
+] interface IdleDetector : EventTarget {
+ constructor();
+ readonly attribute UserIdleState? userState;
+ readonly attribute ScreenIdleState? screenState;
+ attribute EventHandler onchange;
+ [Exposed=Window] static Promise<PermissionState> requestPermission();
+ Promise<void> start(optional IdleOptions options = {});
+};
diff --git a/interfaces/idle-detection.tentative.idl b/interfaces/idle-detection.tentative.idl
deleted file mode 100644
index 865370a..0000000
--- a/interfaces/idle-detection.tentative.idl
+++ /dev/null
@@ -1,26 +0,0 @@
-dictionary IdleOptions {
- [EnforceRange] unsigned long threshold;
- AbortSignal signal;
-};
-
-enum UserIdleState {
- "active",
- "idle"
-};
-
-enum ScreenIdleState {
- "locked",
- "unlocked"
-};
-
-[
- SecureContext,
- Exposed=(Window,Worker)
-] interface IdleDetector : EventTarget {
- constructor();
- readonly attribute UserIdleState? userState;
- readonly attribute ScreenIdleState? screenState;
- attribute EventHandler onchange;
- [Exposed=Window] static Promise<PermissionState> requestPermission();
- Promise<any> start(optional IdleOptions options = {});
-};