2023-07-14 23:38:01 +00:00
|
|
|
// We check the background color on the jump to definition links in the src code page.
|
2023-04-11 17:11:34 +00:00
|
|
|
go-to: "file://" + |DOC_PATH| + "/src/link_to_definition/lib.rs.html"
|
2021-09-12 13:43:30 +00:00
|
|
|
|
2022-10-23 13:40:56 +00:00
|
|
|
define-function: (
|
|
|
|
"check-background-color",
|
|
|
|
(theme, background_color),
|
2023-01-06 14:18:51 +00:00
|
|
|
block {
|
2022-10-23 13:40:56 +00:00
|
|
|
// Set the theme.
|
2023-04-11 17:11:34 +00:00
|
|
|
set-local-storage: { "rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false" }
|
2022-10-23 13:40:56 +00:00
|
|
|
// We reload the page so the local storage settings are being used.
|
2023-01-06 14:18:51 +00:00
|
|
|
reload:
|
|
|
|
assert-css: (
|
2023-07-14 23:38:01 +00:00
|
|
|
"body.src .example-wrap pre.rust a",
|
2022-10-23 13:40:56 +00:00
|
|
|
{"background-color": |background_color|},
|
|
|
|
ALL,
|
2023-01-06 14:18:51 +00:00
|
|
|
)
|
|
|
|
},
|
2021-12-12 17:28:58 +00:00
|
|
|
)
|
2021-09-12 13:43:30 +00:00
|
|
|
|
2023-05-23 13:26:59 +00:00
|
|
|
call-function: ("check-background-color", ("ayu", "#333"))
|
|
|
|
call-function: ("check-background-color", ("dark", "#333"))
|
|
|
|
call-function: ("check-background-color", ("light", "#eee"))
|