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