idlharness_receiving-ua.html (1680B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>Presentation API IDL tests for Receiving User Agent</title> 4 <link rel="author" title="Louay Bassbouss" href="http://www.fokus.fraunhofer.de"> 5 <link rel="author" title="Tomoyuki Shimizu" href="https://github.com/tomoyukilabs"> 6 <link rel="help" href="http://w3c.github.io/presentation-api/#dfn-receiving-user-agent"> 7 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharnessreport.js"></script> 9 <script src="/resources/WebIDLParser.js"></script> 10 <script src="/resources/idlharness.js"></script> 11 <script src="../common.js"></script> 12 <script src="stash.js"></script> 13 14 <script> 15 'use strict'; 16 (async () => { 17 const srcs = ['presentation-api', 'dom', 'html']; 18 const [idl, dom, html] = await Promise.all( 19 srcs.map(i => fetch(`/interfaces/${i}.idl`).then(r => r.text()))); 20 21 const idl_array = new IdlArray(); 22 idl_array.add_idls(idl, { 23 except: [ 24 'PresentationRequest', 25 'PresentationAvailability', 26 ] 27 }); 28 idl_array.add_dependency_idls(dom); 29 idl_array.add_dependency_idls(html); 30 idl_array.add_objects({ 31 Presentation: ['navigator.presentation'], 32 PresentationReceiver: ['navigator.presentation.receiver'] 33 }); 34 add_completion_callback((tests, status) => { 35 const stash = new Stash(stashIds.toReceiver, stashIds.toController); 36 const log = document.getElementById('log'); 37 stash.send(JSON.stringify({ tests: tests, status: status, log: log.innerHTML })); 38 }); 39 idl_array.test(); 40 })(); 41 </script>