summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/idle-detection/resources/idle-detection-helper.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/idle-detection/resources/idle-detection-helper.js')
-rw-r--r--testing/web-platform/tests/idle-detection/resources/idle-detection-helper.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/testing/web-platform/tests/idle-detection/resources/idle-detection-helper.js b/testing/web-platform/tests/idle-detection/resources/idle-detection-helper.js
new file mode 100644
index 0000000000..f053e635e0
--- /dev/null
+++ b/testing/web-platform/tests/idle-detection/resources/idle-detection-helper.js
@@ -0,0 +1,14 @@
+'use strict';
+
+// These tests rely on the User Agent providing an implementation of
+// platform nfc backends.
+//
+// In Chromium-based browsers this implementation is provided by a polyfill
+// in order to reduce the amount of test-only code shipped to users. To enable
+// these tests the browser must be run with these options:
+//
+// --enable-blink-features=MojoJS,MojoJSTest
+
+async function loadChromiumResources() {
+ await import('/resources/chromium/mock-idle-detection.js');
+}