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
60
61
62
63
64
65
66
67
|
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Test css properties that are inactive in :visited rule.
const TEST_URI = URL_ROOT + "doc_visited.html";
const TEST_DATA = [
{
selector: "#visited",
inactiveDeclarations: [
{
declaration: { "font-size": "100px" },
ruleIndex: 2,
},
{
declaration: { "margin-left": "50px" },
ruleIndex: 2,
},
],
activeDeclarations: [
{
declarations: {
"background-color": "transparent",
"border-color": "lime",
color: "rgba(0, 255, 0, 0.8)",
"text-decoration-color": "lime",
"text-emphasis-color": "seagreen",
},
ruleIndex: 2,
},
],
},
{
selector: "#visited-and-other-matched-selector",
activeDeclarations: [
{
declarations: {
"background-color": "transparent",
"border-color": "lime",
color: "rgba(0, 255, 0, 0.8)",
"font-size": "100px",
"margin-left": "50px",
"text-decoration-color": "lime",
"text-emphasis-color": "seagreen",
},
ruleIndex: 1,
},
],
},
];
add_task(async () => {
info("Open a url which has visited links");
const tab = await addTab(TEST_URI);
info("Wait until the visited links are available");
const selectors = TEST_DATA.map(t => t.selector);
await waitUntilVisitedState(tab, selectors);
info("Open the inspector");
const { inspector, view } = await openRuleView();
await runInactiveCSSTests(view, inspector, TEST_DATA);
});
|