]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/headers-color.goml
Rollup merge of #90854 - sanxiyn:unsized-and-uninhabited, r=estebank
[rust.git] / src / test / rustdoc-gui / headers-color.goml
1 // This test check for headers text and background colors for the different themes.
2 goto: file://|DOC_PATH|/test_docs/struct.Foo.html
3
4 // This is needed so that the text color is computed.
5 show-text: true
6
7 // Ayu theme
8 local-storage: {"rustdoc-theme": "ayu", "rustdoc-preferred-dark-theme": "ayu", "rustdoc-use-system-theme": "false"}
9 reload:
10
11 assert-css: (".impl", {"color": "rgb(197, 197, 197)", "background-color": "rgba(0, 0, 0, 0)"}, ALL)
12 assert-css: (".impl .code-header", {"color": "rgb(230, 225, 207)", "background-color": "rgb(15, 20, 25)"}, ALL)
13
14 goto: file://|DOC_PATH|/test_docs/struct.Foo.html#impl
15 assert-css: ("#impl", {"color": "rgb(197, 197, 197)", "background-color": "rgba(255, 236, 164, 0.06)"})
16
17 goto: file://|DOC_PATH|/test_docs/struct.Foo.html#method.must_use
18 assert-css: ("#method\.must_use", {"color": "rgb(197, 197, 197)", "background-color": "rgba(255, 236, 164, 0.06)"}, ALL)
19
20 goto: file://|DOC_PATH|/test_docs/index.html
21 assert-css: (".section-header a", {"color": "rgb(197, 197, 197)"}, ALL)
22
23 // Dark theme
24 local-storage: {"rustdoc-theme": "dark", "rustdoc-preferred-dark-theme": "dark", "rustdoc-use-system-theme": "false"}
25 goto: file://|DOC_PATH|/test_docs/struct.Foo.html
26
27 assert-css: (".impl", {"color": "rgb(221, 221, 221)", "background-color": "rgba(0, 0, 0, 0)"}, ALL)
28 assert-css: (".impl .code-header", {"color": "rgb(221, 221, 221)", "background-color": "rgb(53, 53, 53)"}, ALL)
29
30 goto: file://|DOC_PATH|/test_docs/struct.Foo.html#impl
31 assert-css: ("#impl", {"color": "rgb(221, 221, 221)", "background-color": "rgb(73, 74, 61)"})
32
33 goto: file://|DOC_PATH|/test_docs/struct.Foo.html#method.must_use
34 assert-css: ("#method\.must_use", {"color": "rgb(221, 221, 221)", "background-color": "rgb(73, 74, 61)"}, ALL)
35
36 goto: file://|DOC_PATH|/test_docs/index.html
37 assert-css: (".section-header a", {"color": "rgb(221, 221, 221)"}, ALL)
38
39 // Light theme
40 local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
41 reload:
42
43 goto: file://|DOC_PATH|/test_docs/struct.Foo.html
44
45 assert-css: (".impl", {"color": "rgb(0, 0, 0)", "background-color": "rgba(0, 0, 0, 0)"}, ALL)
46 assert-css: (".impl .code-header", {"color": "rgb(0, 0, 0)", "background-color": "rgb(255, 255, 255)"}, ALL)
47
48 goto: file://|DOC_PATH|/test_docs/struct.Foo.html#impl
49 assert-css: ("#impl", {"color": "rgb(0, 0, 0)", "background-color": "rgb(253, 255, 211)"})
50
51 goto: file://|DOC_PATH|/test_docs/struct.Foo.html#method.must_use
52 assert-css: ("#method\.must_use", {"color": "rgb(0, 0, 0)", "background-color": "rgb(253, 255, 211)"}, ALL)
53
54 goto: file://|DOC_PATH|/test_docs/index.html
55 assert-css: (".section-header a", {"color": "rgb(0, 0, 0)"}, ALL)