fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
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. 3// 4// While we're at it, we also check it for the other themes. 5go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html" 6// If the text isn't displayed, the browser doesn't compute color style correctly... 7show-text: true 8 9define-function: ( 10 "check-colors", 11 (theme, doc_code_color, doc_inline_code_color), 12 block { 13 // Set the theme. 14 set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"} 15 // We reload the page so the local storage settings are being used. 16 reload: 17 assert-css: (".docblock pre > code", {"color": |doc_code_color|}, ALL) 18 assert-css: (".docblock > p > code", {"color": |doc_inline_code_color|}, ALL) 19 }, 20) 21 22call-function: ("check-colors", { 23 "theme": "ayu", 24 "doc_code_color": "#e6e1cf", 25 "doc_inline_code_color": "#ffb454", 26}) 27call-function: ("check-colors", { 28 "theme": "dark", 29 "doc_code_color": "#ddd", 30 "doc_inline_code_color": "#ddd", 31}) 32call-function: ("check-colors", { 33 "theme": "light", 34 "doc_code_color": "black", 35 "doc_inline_code_color": "black", 36})