diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/rustdoc-gui/jump-to-def-background.goml | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/test/rustdoc-gui/jump-to-def-background.goml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/jump-to-def-background.goml b/src/test/rustdoc-gui/jump-to-def-background.goml new file mode 100644 index 000000000..d17400f5b --- /dev/null +++ b/src/test/rustdoc-gui/jump-to-def-background.goml @@ -0,0 +1,43 @@ +// We check the background color on the jump to definition links in the source code page. +goto: file://|DOC_PATH|/src/link_to_definition/lib.rs.html + +// Set the theme to dark. +local-storage: { + "rustdoc-theme": "dark", + "rustdoc-preferred-dark-theme": "dark", + "rustdoc-use-system-theme": "false", +} +// We reload the page so the local storage settings are being used. +reload: + +assert-css: ( + "body.source .example-wrap pre.rust a", + {"background-color": "rgb(51, 51, 51)"}, + ALL, +) + +// Set the theme to ayu. +local-storage: { + "rustdoc-theme": "ayu", + "rustdoc-preferred-dark-theme": "ayu", + "rustdoc-use-system-theme": "false", +} +// We reload the page so the local storage settings are being used. +reload: + +assert-css: ( + "body.source .example-wrap pre.rust a", + {"background-color": "rgb(51, 51, 51)"}, + ALL, +) + +// Set the theme to light. +local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"} +// We reload the page so the local storage settings are being used. +reload: + +assert-css: ( + "body.source .example-wrap pre.rust a", + {"background-color": "rgb(238, 238, 238)"}, + ALL, +) |