]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/rust-logo.goml
Auto merge of #104431 - alistair23:alistair/rv64-profiler, r=Mark-Simulacrum
[rust.git] / src / test / rustdoc-gui / rust-logo.goml
1 // This test ensures that the correct style is applied to the rust logo in the sidebar.
2 goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
3
4 define-function: (
5     "check-logo",
6     (theme, filter),
7     [
8         // Going to the doc page.
9         ("goto", "file://" + |DOC_PATH| + "/test_docs/index.html"),
10         // Changing theme.
11         ("local-storage", {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}),
12         ("reload"),
13         ("assert-css", (".rust-logo", {"filter": |filter|})),
14         // Going to the source code page.
15         ("goto", "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"),
16         // Changing theme (since it's local files, the local storage works by folder).
17         ("local-storage", {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}),
18         ("reload"),
19         ("assert-css", (".rust-logo", {"filter": |filter|})),
20         // Now we check that the non-rust logos don't have a CSS filter set.
21         ("goto", "file://" + |DOC_PATH| + "/huge_logo/index.html"),
22         // Changing theme on the new page (again...).
23         ("local-storage", {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}),
24         ("reload"),
25         // Check there is no rust logo
26         ("assert-false", ".rust-logo"),
27         // Check there is no filter.
28         ("assert-css", (".sidebar .logo-container img", {"filter": "none"})),
29     ],
30 )
31
32 call-function: (
33     "check-logo",
34     ("ayu", "drop-shadow(rgb(255, 255, 255) 1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px 1px 0px) drop-shadow(rgb(255, 255, 255) -1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px -1px 0px)"),
35 )
36 call-function: (
37     "check-logo",
38     ("dark", "drop-shadow(rgb(255, 255, 255) 1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px 1px 0px) drop-shadow(rgb(255, 255, 255) -1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px -1px 0px)"),
39 )
40 call-function: (
41     "check-logo",
42     ("light", "none"),
43 )