network-partition-checker.html (1052B)
1 <!doctype html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Network Partition Checker</title> 6 <meta name="help" href="https://fetch.spec.whatwg.org/#network-partition-keys"> 7 <meta name="timeout" content="normal"> 8 <script src="SUBRESOURCE_PREFIX:&dispatch=fetch_file&path=common/utils.js"></script> 9 <script src="SUBRESOURCE_PREFIX:&dispatch=fetch_file&path=resources/testharness.js"></script> 10 <script src="SUBRESOURCE_PREFIX:&dispatch=fetch_file&path=fetch/connection-pool/resources/network-partition-key.js"></script> 11 </head> 12 <body> 13 <script> 14 async function fetch_and_reply() { 15 // If this is a top level window, report to the opener. Otherwise, this is an iframe, 16 // so report to the parent. 17 var report_to = window.opener; 18 if (!report_to) 19 report_to = window.parent; 20 try { 21 await check_partition_ids(); 22 report_to.postMessage({result: 'success'}, '*'); 23 } catch (e) { 24 report_to.postMessage({result: 'error', details: e.message}, '*'); 25 } 26 } 27 fetch_and_reply(); 28 </script> 29 </body> 30 </html>