summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/presentation-api/receiving-ua/support/idlharness_receiving-ua.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /testing/web-platform/tests/presentation-api/receiving-ua/support/idlharness_receiving-ua.html
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/presentation-api/receiving-ua/support/idlharness_receiving-ua.html')
-rw-r--r--testing/web-platform/tests/presentation-api/receiving-ua/support/idlharness_receiving-ua.html41
1 files changed, 41 insertions, 0 deletions
diff --git a/testing/web-platform/tests/presentation-api/receiving-ua/support/idlharness_receiving-ua.html b/testing/web-platform/tests/presentation-api/receiving-ua/support/idlharness_receiving-ua.html
new file mode 100644
index 0000000000..2d5a5b17f1
--- /dev/null
+++ b/testing/web-platform/tests/presentation-api/receiving-ua/support/idlharness_receiving-ua.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Presentation API IDL tests for Receiving User Agent</title>
+<link rel="author" title="Louay Bassbouss" href="http://www.fokus.fraunhofer.de">
+<link rel="author" title="Tomoyuki Shimizu" href="https://github.com/tomoyukilabs">
+<link rel="help" href="http://w3c.github.io/presentation-api/#dfn-receiving-user-agent">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/WebIDLParser.js"></script>
+<script src="/resources/idlharness.js"></script>
+<script src="../common.js"></script>
+<script src="stash.js"></script>
+
+<script>
+ 'use strict';
+ (async () => {
+ const srcs = ['presentation-api', 'dom', 'html'];
+ const [idl, dom, html] = await Promise.all(
+ srcs.map(i => fetch(`/interfaces/${i}.idl`).then(r => r.text())));
+
+ const idl_array = new IdlArray();
+ idl_array.add_idls(idl, {
+ except: [
+ 'PresentationRequest',
+ 'PresentationAvailability',
+ ]
+ });
+ idl_array.add_dependency_idls(dom);
+ idl_array.add_dependency_idls(html);
+ idl_array.add_objects({
+ Presentation: ['navigator.presentation'],
+ PresentationReceiver: ['navigator.presentation.receiver']
+ });
+ add_completion_callback((tests, status) => {
+ const stash = new Stash(stashIds.toReceiver, stashIds.toController);
+ const log = document.getElementById('log');
+ stash.send(JSON.stringify({ tests: tests, status: status, log: log.innerHTML }));
+ });
+ idl_array.test();
+ })();
+</script>