summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/presentation-api/receiving-ua/support/idlharness_receiving-ua.html
diff options
context:
space:
mode:
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>