1 // Ensures that the theme is working when going back in history.
2 goto: file://|DOC_PATH|/test_docs/index.html
3 // Set the theme to dark.
5 "rustdoc-theme": "dark",
6 "rustdoc-preferred-dark-theme": "dark",
7 "rustdoc-use-system-theme": "false",
9 // We reload the page so the local storage settings are being used.
11 assert-css: ("body", { "background-color": "rgb(53, 53, 53)" })
12 assert-local-storage: { "rustdoc-theme": "dark" }
14 // Now we go to the settings page.
15 goto: file://|DOC_PATH|/settings.html
17 // We change the theme to "light".
19 wait-for-css: ("body", { "background-color": "rgb(255, 255, 255)" })
20 assert-local-storage: { "rustdoc-theme": "light" }
22 // We go back in history.
24 // Confirm that we're not on the settings page.
25 assert-false: "#settings"
26 // Check that the current theme is still "light".
27 assert-css: ("body", { "background-color": "rgb(255, 255, 255)" })
28 assert-local-storage: { "rustdoc-theme": "light" }