client-hints.https.html (1376B)
1 <!DOCTYPE html> 2 <title>Client hints in fenced frames test</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="/resources/testdriver.js"></script> 6 <script src="/resources/testdriver-vendor.js"></script> 7 <script src="resources/utils.js"></script> 8 <script src="resources/client-hints-common.sub.js"></script> 9 <script src="/common/get-host-info.sub.js"></script> 10 <script src="/common/utils.js"></script> 11 <script src="/common/dispatcher/dispatcher.js"></script> 12 <script src="/resources/testdriver-actions.js"></script> 13 <body> 14 <script> 15 promise_test(async () => { 16 const key = token(); 17 const url = generateURL('resources/client-hints-inner.sub.https.html', [key]); 18 const remote_url = getRemoteOriginURL(url); 19 attachFencedFrame(remote_url); 20 const result = JSON.parse(await nextValueFromServer(key)); 21 22 // We should not see client hints for the fenced frame root or subframes // 23 // within the fenced frame tree due to the reject-all permission policy used by 24 // fenced frames. 25 const headers = ['root-fenced-frame-headers', 'iframe-headers']; 26 const hints = [ 27 'sec-ch-viewport-width', 'sec-ch-ua-mobile', 28 ]; 29 headers.forEach(header => { 30 hints.forEach(hint => { 31 assert_equals(result[header][hint], ''); 32 }); 33 }); 34 }, 'fenced frames not send client hints'); 35 </script> 36 </body>