1 // The ayu theme has a different color for the "<code>" tags in the doc blocks. We need to
2 // check that the rule isn't applied on other "<code>" elements.
4 // While we're at it, we also check it for the other themes.
5 goto: file://|DOC_PATH|/test_docs/fn.foo.html
6 // If the text isn't displayed, the browser doesn't compute color style correctly...
8 // Set the theme to dark.
9 local-storage: {"rustdoc-theme": "dark", "rustdoc-preferred-dark-theme": "dark", "rustdoc-use-system-theme": "false"}
10 // We reload the page so the local storage settings are being used.
13 assert-css: (".docblock pre > code", {"color": "rgb(221, 221, 221)"}, ALL)
14 assert-css: (".docblock > p > code", {"color": "rgb(221, 221, 221)"}, ALL)
16 // Set the theme to ayu.
17 local-storage: {"rustdoc-theme": "ayu", "rustdoc-preferred-dark-theme": "ayu", "rustdoc-use-system-theme": "false"}
18 // We reload the page so the local storage settings are being used.
21 assert-css: (".docblock pre > code", {"color": "rgb(230, 225, 207)"}, ALL)
22 assert-css: (".docblock > p > code", {"color": "rgb(255, 180, 84)"}, ALL)
24 // Set the theme to light.
25 local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
26 // We reload the page so the local storage settings are being used.
29 assert-css: (".docblock pre > code", {"color": "rgb(0, 0, 0)"}, ALL)
30 assert-css: (".docblock > p > code", {"color": "rgb(0, 0, 0)"}, ALL)