set-client-hints-after-clear-cache.https.html (886B)
1 <!DOCTYPE html> 2 <body> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script> 6 // Here's the set-up for this test: 7 // Step 1 (first window) Set client hints in the same header that clears them. 8 // Step 2 (first window) Open second window. 9 // Step 3 (second window) Message first window about client hints sent. 10 // Step 4 (first window) Asserts client hints not sent. 11 async_test(t => { 12 // Step 4 13 window.addEventListener("message", t.step_func(e => { 14 assert_equals(e.data, "MissingDeviceMemory"); 15 t.done(); 16 }), {once: true}); 17 18 // Step 2 19 new_window = window.open("/client-hints/clear-site-data/resources/check-client-hints.py"); 20 t.add_cleanup(new_window.close); 21 }, "Setting client hints after Clear-Site-Data for cache shouldn't allow the client hints to take."); 22 </script> 23 </body> 24 </html>