]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-gui/docblock-table.goml
Rollup merge of #106709 - khuey:disable_split_dwarf_inlining_by_default, r=davidtwco
[rust.git] / tests / rustdoc-gui / docblock-table.goml
1 // This test checks the appearance of the tables in the doc comments.
2 goto: "file://" + |DOC_PATH| + "/test_docs/doc_block_table/struct.DocBlockTable.html#method.func"
3
4 compare-elements-css: (".impl-items .docblock table th", ".top-doc .docblock table th", ["border"])
5 compare-elements-css: (".impl-items .docblock table td", ".top-doc .docblock table td", ["border"])
6
7 define-function: (
8     "check-colors",
9     (theme, border_color, zebra_stripe_color),
10     block {
11         local-storage: {"rustdoc-use-system-theme": "false", "rustdoc-theme": |theme|}
12         reload:
13         assert-css: (".top-doc .docblock table tbody tr:nth-child(1)", {
14             "background-color": "rgba(0, 0, 0, 0)",
15         })
16         assert-css: (".top-doc .docblock table tbody tr:nth-child(2)", {
17             "background-color": |zebra_stripe_color|,
18         })
19         assert-css: (".top-doc .docblock table tbody tr:nth-child(3)", {
20             "background-color": "rgba(0, 0, 0, 0)",
21         })
22         assert-css: (".top-doc .docblock table tbody tr:nth-child(4)", {
23             "background-color": |zebra_stripe_color|,
24         })
25         assert-css: (".top-doc .docblock table td", {
26             "border-style": "solid",
27             "border-width": "1px",
28             "border-color": |border_color|,
29         })
30         assert-css: (".top-doc .docblock table th", {
31             "border-style": "solid",
32             "border-width": "1px",
33             "border-color": |border_color|,
34         })
35     }
36 )
37
38 call-function: ("check-colors", {
39     "theme": "dark",
40     "border_color": "rgb(224, 224, 224)",
41     "zebra_stripe_color": "rgb(42, 42, 42)",
42 })
43 call-function: ("check-colors", {
44     "theme": "ayu",
45     "border_color": "rgb(92, 103, 115)",
46     "zebra_stripe_color": "rgb(25, 31, 38)",
47 })
48 call-function: ("check-colors", {
49     "theme": "light",
50     "border_color": "rgb(224, 224, 224)",
51     "zebra_stripe_color": "rgb(245, 245, 245)",
52 })