summaryrefslogtreecommitdiffstats
path: root/src/test/rustdoc-gui/jump-to-def-background.goml
blob: d17400f5bd9e8b7ba281d8cac5d293d99861d811 (plain)
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
// We check the background color on the jump to definition links in the source code page.
goto: file://|DOC_PATH|/src/link_to_definition/lib.rs.html

// Set the theme to dark.
local-storage: {
    "rustdoc-theme": "dark",
    "rustdoc-preferred-dark-theme": "dark",
    "rustdoc-use-system-theme": "false",
}
// We reload the page so the local storage settings are being used.
reload:

assert-css: (
    "body.source .example-wrap pre.rust a",
    {"background-color": "rgb(51, 51, 51)"},
    ALL,
)

// Set the theme to ayu.
local-storage: {
    "rustdoc-theme": "ayu",
    "rustdoc-preferred-dark-theme": "ayu",
    "rustdoc-use-system-theme": "false",
}
// We reload the page so the local storage settings are being used.
reload:

assert-css: (
    "body.source .example-wrap pre.rust a",
    {"background-color": "rgb(51, 51, 51)"},
    ALL,
)

// Set the theme to light.
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
// We reload the page so the local storage settings are being used.
reload:

assert-css: (
    "body.source .example-wrap pre.rust a",
    {"background-color": "rgb(238, 238, 238)"},
    ALL,
)