]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/jump-to-def-background.goml
Rollup merge of #105814 - JakobDegen:custom-mir-terms, r=oli-obk
[rust.git] / src / test / rustdoc-gui / jump-to-def-background.goml
1 // We check the background color on the jump to definition links in the source code page.
2 goto: "file://" + |DOC_PATH| + "/src/link_to_definition/lib.rs.html"
3
4 define-function: (
5     "check-background-color",
6     (theme, background_color),
7     [
8         // Set the theme.
9         ("local-storage", { "rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false" }),
10         // We reload the page so the local storage settings are being used.
11         ("reload"),
12         ("assert-css", (
13             "body.source .example-wrap pre.rust a",
14             {"background-color": |background_color|},
15             ALL,
16         )),
17     ],
18 )
19
20 call-function: ("check-background-color", ("ayu", "rgb(51, 51, 51)"))
21 call-function: ("check-background-color", ("dark", "rgb(51, 51, 51)"))
22 call-function: ("check-background-color", ("light", "rgb(238, 238, 238)"))