1 // Ensures that the theme change is working as expected.
2 goto: file://|DOC_PATH|/test_docs/index.html
3 local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": "dark"}
5 click: "#settings-menu"
8 // should be the ayu theme so let's check the color.
9 wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" })
10 assert-local-storage: { "rustdoc-theme": "ayu" }
12 // should be the light theme so let's check the color.
13 wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" })
14 assert-local-storage: { "rustdoc-theme": "light" }
16 // Should be the dark theme so let's check the color.
17 wait-for-css: ("body", { "background-color": "rgb(53, 53, 53)" })
18 assert-local-storage: { "rustdoc-theme": "dark" }
20 goto: file://|DOC_PATH|/settings.html
23 wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" })
24 assert-local-storage: { "rustdoc-theme": "light" }
27 wait-for-css: ("body", { "background-color": "rgb(53, 53, 53)" })
28 assert-local-storage: { "rustdoc-theme": "dark" }
31 wait-for-css: ("body", { "background-color": "rgb(15, 20, 25)" })
32 assert-local-storage: { "rustdoc-theme": "ayu" }