]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-gui/target.goml
Rollup merge of #104252 - faern:stabilize-const_socketaddr, r=JohnTitor
[rust.git] / tests / rustdoc-gui / target.goml
1 // Check that the targetted element has the expected styles.
2 goto: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html#method.a_method"
3 show-text: true
4
5 // Confirming that the method is the target.
6 assert: "#method\.a_method:target"
7
8 define-function: (
9     "check-style",
10     (theme, background, border),
11     block {
12         local-storage: {"rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false"}
13         reload:
14         assert-css: ("#method\.a_method:target", {
15             "background-color": |background|,
16             "border-right": "3px solid " + |border|,
17         })
18     },
19 )
20
21 call-function: ("check-style", {
22     "theme": "ayu",
23     "background": "rgba(255, 236, 164, 0.06)",
24     "border": "rgba(255, 180, 76, 0.85)",
25 })
26 call-function: ("check-style", {
27     "theme": "dark",
28     "background": "rgb(73, 74, 61)",
29     "border": "rgb(187, 116, 16)",
30 })
31 call-function: ("check-style", {
32     "theme": "light",
33     "background": "rgb(253, 255, 211)",
34     "border": "rgb(173, 124, 55)",
35 })