2021-08-13 07:23:13 -05:00
|
|
|
// This test check for headers text and background colors for the different themes.
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
2021-08-13 07:23:13 -05:00
|
|
|
|
|
|
|
// This is needed so that the text color is computed.
|
|
|
|
show-text: true
|
|
|
|
|
|
|
|
// Ayu theme
|
2021-12-12 11:28:58 -06:00
|
|
|
local-storage: {
|
|
|
|
"rustdoc-theme": "ayu",
|
|
|
|
"rustdoc-preferred-dark-theme": "ayu",
|
|
|
|
"rustdoc-use-system-theme": "false",
|
|
|
|
}
|
2021-08-13 07:23:13 -05:00
|
|
|
reload:
|
|
|
|
|
2021-12-12 11:28:58 -06:00
|
|
|
assert-css: (
|
|
|
|
".impl",
|
|
|
|
{"color": "rgb(197, 197, 197)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
ALL,
|
|
|
|
)
|
|
|
|
assert-css: (
|
|
|
|
".impl .code-header",
|
2022-09-25 15:09:22 -05:00
|
|
|
{"color": "rgb(230, 225, 207)", "background-color": "rgba(0, 0, 0, 0)"},
|
2021-12-12 11:28:58 -06:00
|
|
|
ALL,
|
|
|
|
)
|
2021-08-13 07:23:13 -05:00
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#impl-Foo"
|
2021-12-12 11:28:58 -06:00
|
|
|
assert-css: (
|
2022-01-10 15:35:55 -06:00
|
|
|
"#impl-Foo",
|
2021-12-12 11:28:58 -06:00
|
|
|
{"color": "rgb(197, 197, 197)", "background-color": "rgba(255, 236, 164, 0.06)"},
|
|
|
|
)
|
2021-08-13 07:23:13 -05:00
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.must_use"
|
2021-12-12 11:28:58 -06:00
|
|
|
assert-css: (
|
|
|
|
"#method\.must_use",
|
|
|
|
{"color": "rgb(197, 197, 197)", "background-color": "rgba(255, 236, 164, 0.06)"},
|
|
|
|
ALL,
|
|
|
|
)
|
2021-08-13 07:23:13 -05:00
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
2021-12-04 13:19:33 -06:00
|
|
|
assert-css: (".small-section-header a", {"color": "rgb(197, 197, 197)"}, ALL)
|
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
|
2022-02-09 07:44:10 -06:00
|
|
|
// We select headings (h2, h3, h...).
|
|
|
|
assert-css: (".docblock > :not(p) > a", {"color": "rgb(57, 175, 215)"}, ALL)
|
2021-11-24 06:35:25 -06:00
|
|
|
|
2021-08-13 07:23:13 -05:00
|
|
|
// Dark theme
|
2021-12-12 11:28:58 -06:00
|
|
|
local-storage: {
|
|
|
|
"rustdoc-theme": "dark",
|
|
|
|
"rustdoc-preferred-dark-theme": "dark",
|
|
|
|
"rustdoc-use-system-theme": "false",
|
|
|
|
}
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
2021-08-13 07:23:13 -05:00
|
|
|
|
2021-12-12 11:28:58 -06:00
|
|
|
assert-css: (
|
|
|
|
".impl",
|
|
|
|
{"color": "rgb(221, 221, 221)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
ALL,
|
|
|
|
)
|
|
|
|
assert-css: (
|
|
|
|
".impl .code-header",
|
2022-09-25 15:09:22 -05:00
|
|
|
{"color": "rgb(221, 221, 221)", "background-color": "rgba(0, 0, 0, 0)"},
|
2021-12-12 11:28:58 -06:00
|
|
|
ALL,
|
|
|
|
)
|
2021-08-13 07:23:13 -05:00
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#impl-Foo"
|
2021-12-12 11:28:58 -06:00
|
|
|
assert-css: (
|
2022-01-10 15:35:55 -06:00
|
|
|
"#impl-Foo",
|
2021-12-12 11:28:58 -06:00
|
|
|
{"color": "rgb(221, 221, 221)", "background-color": "rgb(73, 74, 61)"},
|
|
|
|
)
|
2021-08-13 07:23:13 -05:00
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.must_use"
|
2021-12-12 11:28:58 -06:00
|
|
|
assert-css: (
|
|
|
|
"#method\.must_use",
|
|
|
|
{"color": "rgb(221, 221, 221)", "background-color": "rgb(73, 74, 61)"},
|
|
|
|
ALL,
|
|
|
|
)
|
2021-08-13 07:23:13 -05:00
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
2021-12-04 13:19:33 -06:00
|
|
|
assert-css: (".small-section-header a", {"color": "rgb(221, 221, 221)"}, ALL)
|
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
|
2022-02-09 07:44:10 -06:00
|
|
|
// We select headings (h2, h3, h...).
|
|
|
|
assert-css: (".docblock > :not(p) > a", {"color": "rgb(210, 153, 29)"}, ALL)
|
2021-11-24 06:35:25 -06:00
|
|
|
|
2021-08-13 07:23:13 -05:00
|
|
|
// Light theme
|
|
|
|
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
|
|
|
|
reload:
|
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
2021-08-13 07:23:13 -05:00
|
|
|
|
2021-12-12 11:28:58 -06:00
|
|
|
assert-css: (
|
|
|
|
".impl",
|
|
|
|
{"color": "rgb(0, 0, 0)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
ALL,
|
|
|
|
)
|
|
|
|
assert-css: (
|
|
|
|
".impl .code-header",
|
2022-09-25 15:09:22 -05:00
|
|
|
{"color": "rgb(0, 0, 0)", "background-color": "rgba(0, 0, 0, 0)"},
|
2021-12-12 11:28:58 -06:00
|
|
|
ALL,
|
|
|
|
)
|
2021-08-13 07:23:13 -05:00
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#impl-Foo"
|
2022-01-10 15:35:55 -06:00
|
|
|
assert-css: ("#impl-Foo", {"color": "rgb(0, 0, 0)", "background-color": "rgb(253, 255, 211)"})
|
2021-08-13 07:23:13 -05:00
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.must_use"
|
2021-12-12 11:28:58 -06:00
|
|
|
assert-css: (
|
|
|
|
"#method\.must_use",
|
|
|
|
{"color": "rgb(0, 0, 0)", "background-color": "rgb(253, 255, 211)"},
|
|
|
|
ALL,
|
|
|
|
)
|
2021-11-24 06:35:25 -06:00
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
2021-12-04 13:19:33 -06:00
|
|
|
assert-css: (".small-section-header a", {"color": "rgb(0, 0, 0)"}, ALL)
|
|
|
|
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
|
2022-02-09 07:44:10 -06:00
|
|
|
// We select headings (h2, h3, h...).
|
|
|
|
assert-css: (".docblock > :not(p) > a", {"color": "rgb(56, 115, 173)"}, ALL)
|