File: partitioned-visited-manual.tentative.html

package info (click to toggle)
firefox 144.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,637,504 kB
  • sloc: cpp: 7,576,692; javascript: 6,430,831; ansic: 3,748,119; python: 1,398,978; xml: 628,810; asm: 438,679; java: 186,194; sh: 63,212; makefile: 19,159; objc: 13,086; perl: 12,986; yacc: 4,583; cs: 3,846; pascal: 3,448; lex: 1,720; ruby: 1,003; exp: 762; php: 436; lisp: 258; awk: 247; sql: 66; sed: 53; csh: 10
file content (59 lines) | stat: -rw-r--r-- 2,692 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<meta charset="utf-8">
<title>:visited links are partitioned by top-level site and frame origin</title>
<link rel="author" title="Kyra Seevers" href="mailto:kyraseevers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/selectors-4/#visited-privacy">

<!-- Import scripts to build same- and cross-origin URLs -->
<script src="/common/get-host-info.sub.js"></script>

<body>
    <h2>Description</h2>
    <p>The goal of this manual test is to ensure that :visited links are
    partitioned by link URL, top-level site, and frame origin. </p>
    <br/>
    <p>(1) Clear any browsing data, including history.</p>
    <br/>
    <p>(2) Click on the link in the first iframe. The link in this
    top-level frame should turn purple. The link in the second iframe
    should remain blue.</p>
    <br/>
    <!-- This link's triple key is:
    Link URL: https://drafts.csswg.org/selectors-4,
    Top-Level Site: http://localhost,
    Frame Origin: http://localhost:8000 -->
    <a href = "https://drafts.csswg.org/selectors-4">I should turn purple!</a>
    <br/>
    <p>(3) Finally, click on the browser's back arrow.
    </p>
    <br/>
    <p>Test PASSES if: the top-level link (I should turn purple!) is purple,
    the first iframe link (Click me! (Then I should turn purple)) is purple,
    and the second iframe link (I should stay blue) is blue. All other
    conditions: the test FAILS.
    </p>
    <br/> <br/>
    <script>
	// Associate our local HTML resources with an origin that is
	// same- or cross-origin to the top-level page. This is
	// important so that we can accurately compare our
	// triple-partition keys.
	const { HTTP_ORIGIN, HTTP_REMOTE_ORIGIN } = get_host_info();
	let same_origin_url = HTTP_ORIGIN + '/css/selectors/resources/partitioned-visited-same-site-iframe.html';
	let cross_origin_url = HTTP_REMOTE_ORIGIN + '/css/selectors/resources/partitioned-visited-cross-site-iframe.html';
	// Construct the same-origin iframe. This link's triple key is:
	// Link URL: https://drafts.csswg.org/selectors-4,
	// Top-Level Site: http://localhost,
	// Frame Origin: http://localhost:800
	let same_origin_iframe = document.createElement("iframe");
        same_origin_iframe.setAttribute("src", same_origin_url);
	document.body.appendChild(same_origin_iframe);
	// Construct the cross-origin iframe. This link's triple key is:
	// Link URL: https://drafts.csswg.org/selectors-4,
	// Top-Level Site: http://localhost,
	// Frame Origin: http://www1.localhost:800
	let cross_origin_iframe = document.createElement("iframe");
	cross_origin_iframe.setAttribute("src", cross_origin_url);
	document.body.appendChild(cross_origin_iframe);
    </script>
</body>