no-feature-policy.https.html (1127B)
1 <html> 2 <body> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="/common/get-host-info.sub.js"></script> 6 <script src="/client-hints/resources/export.js"></script> 7 <script src="/client-hints/resources/feature-policy-navigation.js"></script> 8 <script> 9 (async () => { 10 await test_frame( 11 "HTTPS_REMOTE_ORIGIN", 12 expect_iframe_no_hints, 13 "", 14 "Client hints not loaded on cross-origin iframe request with no feature policy."); 15 await test_frame( 16 "HTTPS_ORIGIN", 17 expect_iframe_hints, 18 "", 19 "Client hints loaded on same-origin iframe request with no feature policy."); 20 21 let allow = "ch-device-memory *; ch-dpr 'none'; ch-viewport-width 'self'; ch-ua 'self'; ch-ua-mobile 'none';"; await test_frame( 22 "HTTPS_REMOTE_ORIGIN", 23 cross_origin_client_hints, 24 allow, 25 "Client hints loaded on cross-origin iframe request with allow list."); 26 await test_frame( 27 "HTTPS_ORIGIN", 28 same_origin_client_hints, 29 allow, 30 "Client hints loaded on same-origin iframe request with allow list."); 31 })(); 32 33 </script> 34 </body> 35 </html>