partitioned-visited-manual.tentative.html (2692B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>:visited links are partitioned by top-level site and frame origin</title> 4 <link rel="author" title="Kyra Seevers" href="mailto:kyraseevers@chromium.org"> 5 <link rel="help" href="https://drafts.csswg.org/selectors-4/#visited-privacy"> 6 7 <!-- Import scripts to build same- and cross-origin URLs --> 8 <script src="/common/get-host-info.sub.js"></script> 9 10 <body> 11 <h2>Description</h2> 12 <p>The goal of this manual test is to ensure that :visited links are 13 partitioned by link URL, top-level site, and frame origin. </p> 14 <br/> 15 <p>(1) Clear any browsing data, including history.</p> 16 <br/> 17 <p>(2) Click on the link in the first iframe. The link in this 18 top-level frame should turn purple. The link in the second iframe 19 should remain blue.</p> 20 <br/> 21 <!-- This link's triple key is: 22 Link URL: https://drafts.csswg.org/selectors-4, 23 Top-Level Site: http://localhost, 24 Frame Origin: http://localhost:8000 --> 25 <a href = "https://drafts.csswg.org/selectors-4">I should turn purple!</a> 26 <br/> 27 <p>(3) Finally, click on the browser's back arrow. 28 </p> 29 <br/> 30 <p>Test PASSES if: the top-level link (I should turn purple!) is purple, 31 the first iframe link (Click me! (Then I should turn purple)) is purple, 32 and the second iframe link (I should stay blue) is blue. All other 33 conditions: the test FAILS. 34 </p> 35 <br/> <br/> 36 <script> 37 // Associate our local HTML resources with an origin that is 38 // same- or cross-origin to the top-level page. This is 39 // important so that we can accurately compare our 40 // triple-partition keys. 41 const { HTTP_ORIGIN, HTTP_REMOTE_ORIGIN } = get_host_info(); 42 let same_origin_url = HTTP_ORIGIN + '/css/selectors/resources/partitioned-visited-same-site-iframe.html'; 43 let cross_origin_url = HTTP_REMOTE_ORIGIN + '/css/selectors/resources/partitioned-visited-cross-site-iframe.html'; 44 // Construct the same-origin iframe. This link's triple key is: 45 // Link URL: https://drafts.csswg.org/selectors-4, 46 // Top-Level Site: http://localhost, 47 // Frame Origin: http://localhost:800 48 let same_origin_iframe = document.createElement("iframe"); 49 same_origin_iframe.setAttribute("src", same_origin_url); 50 document.body.appendChild(same_origin_iframe); 51 // Construct the cross-origin iframe. This link's triple key is: 52 // Link URL: https://drafts.csswg.org/selectors-4, 53 // Top-Level Site: http://localhost, 54 // Frame Origin: http://www1.localhost:800 55 let cross_origin_iframe = document.createElement("iframe"); 56 cross_origin_iframe.setAttribute("src", cross_origin_url); 57 document.body.appendChild(cross_origin_iframe); 58 </script> 59 </body>