rust/tests/rustdoc-gui/jump-to-def-background.goml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
923 B
Plaintext
Raw Normal View History

// We check the background color on the jump to definition links in the src code page.
go-to: "file://" + |DOC_PATH| + "/src/link_to_definition/lib.rs.html"
define-function: (
"check-background-color",
2024-04-01 14:11:22 -05:00
[theme, background_color],
block {
// Set the theme.
set-local-storage: { "rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false" }
// We reload the page so the local storage settings are being used.
reload:
assert-css: (
"body.src .example-wrap pre.rust a",
{"background-color": |background_color|},
ALL,
)
},
)
2024-04-01 14:11:22 -05:00
call-function: ("check-background-color", {
"theme": "ayu",
"background_color": "#333",
})
call-function: ("check-background-color", {
"theme": "dark",
"background_color": "#333",
})
call-function: ("check-background-color", {
"theme": "light",
"background_color": "#eee",
})