1 // This test check for headers text and background colors for the different themes.
2 goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
4 // This is needed so that the text color is computed.
9 "rustdoc-theme": "ayu",
10 "rustdoc-preferred-dark-theme": "ayu",
11 "rustdoc-use-system-theme": "false",
17 {"color": "rgb(197, 197, 197)", "background-color": "rgba(0, 0, 0, 0)"},
22 {"color": "rgb(230, 225, 207)", "background-color": "rgba(0, 0, 0, 0)"},
26 goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#impl-Foo"
29 {"color": "rgb(197, 197, 197)", "background-color": "rgba(255, 236, 164, 0.06)"},
32 goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.must_use"
35 {"color": "rgb(197, 197, 197)", "background-color": "rgba(255, 236, 164, 0.06)"},
39 goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
40 assert-css: (".small-section-header a", {"color": "rgb(197, 197, 197)"}, ALL)
42 goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
43 // We select headings (h2, h3, h...).
44 assert-css: (".docblock > :not(p) > a", {"color": "rgb(57, 175, 215)"}, ALL)
48 "rustdoc-theme": "dark",
49 "rustdoc-preferred-dark-theme": "dark",
50 "rustdoc-use-system-theme": "false",
52 goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
56 {"color": "rgb(221, 221, 221)", "background-color": "rgba(0, 0, 0, 0)"},
61 {"color": "rgb(221, 221, 221)", "background-color": "rgba(0, 0, 0, 0)"},
65 goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#impl-Foo"
68 {"color": "rgb(221, 221, 221)", "background-color": "rgb(73, 74, 61)"},
71 goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.must_use"
74 {"color": "rgb(221, 221, 221)", "background-color": "rgb(73, 74, 61)"},
78 goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
79 assert-css: (".small-section-header a", {"color": "rgb(221, 221, 221)"}, ALL)
81 goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
82 // We select headings (h2, h3, h...).
83 assert-css: (".docblock > :not(p) > a", {"color": "rgb(210, 153, 29)"}, ALL)
86 local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
89 goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
93 {"color": "rgb(0, 0, 0)", "background-color": "rgba(0, 0, 0, 0)"},
98 {"color": "rgb(0, 0, 0)", "background-color": "rgba(0, 0, 0, 0)"},
102 goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#impl-Foo"
103 assert-css: ("#impl-Foo", {"color": "rgb(0, 0, 0)", "background-color": "rgb(253, 255, 211)"})
105 goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.must_use"
108 {"color": "rgb(0, 0, 0)", "background-color": "rgb(253, 255, 211)"},
112 goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
113 assert-css: (".small-section-header a", {"color": "rgb(0, 0, 0)"}, ALL)
115 goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
116 // We select headings (h2, h3, h...).
117 assert-css: (".docblock > :not(p) > a", {"color": "rgb(56, 115, 173)"}, ALL)