fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// Check position and color of the `<sup>` for unsafe elements. 2go-to: "file://" + |DOC_PATH| + "/test_docs/index.html" 3// If the text isn't displayed, the browser doesn't compute color style correctly... 4show-text: true 5 6compare-elements-property: ( 7 "//a[@title='fn test_docs::safe_fn']/..", 8 "//a[@title='fn test_docs::unsafe_fn']/..", 9 ["clientHeight"] 10) 11 12define-function: ( 13 "sup-check", 14 // `theme` is the theme being tested. 15 // `color` is the expected color of the `<sup>` element. 16 (theme, color), 17 block { 18 // Set the theme. 19 set-local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"} 20 // We reload the page so the local storage settings are being used. 21 reload: 22 assert-css: (".item-name sup", {"color": |color|}) 23 }, 24) 25 26call-function: ("sup-check", ("ayu", "#c5c5c5")) 27call-function: ("sup-check", ("dark", "#ddd")) 28call-function: ("sup-check", ("light", "black"))