]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/check-stab-in-docblock.goml
Merge commit 'f4850f7292efa33759b4f7f9b7621268979e9914' into clippyup
[rust.git] / src / test / rustdoc-gui / check-stab-in-docblock.goml
1 // This test checks that using `.stab` attributes in `.docblock` elements doesn't
2 // create scrollable paragraphs.
3 goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
4 // Needs the text to be display to check for scrollable content.
5 show-text: true
6 size: (786, 600)
7 // Confirms that there 3 paragraphs.
8 assert-count: (".top-doc .docblock p", 3)
9 // Checking that there is no scrollable content.
10 store-property: (clientHeight, ".top-doc .docblock p:nth-of-type(1)", "clientHeight")
11 store-property: (clientWidth, ".top-doc .docblock p:nth-of-type(1)", "clientWidth")
12 assert-property: (
13     ".top-doc .docblock p:nth-of-type(1)",
14     {"scrollHeight": |clientHeight|, "scrollWidth": |clientWidth|},
15 )
16 store-property: (clientHeight, ".top-doc .docblock p:nth-of-type(2)", "clientHeight")
17 store-property: (clientWidth, ".top-doc .docblock p:nth-of-type(2)", "clientWidth")
18 assert-property: (
19     ".top-doc .docblock p:nth-of-type(2)",
20     {"scrollHeight": |clientHeight|, "scrollWidth": |clientWidth|},
21 )
22 store-property: (clientHeight, ".top-doc .docblock p:nth-of-type(3)", "clientHeight")
23 store-property: (clientWidth, ".top-doc .docblock p:nth-of-type(3)", "clientWidth")
24 assert-property: (
25     ".top-doc .docblock p:nth-of-type(3)",
26     {"scrollHeight": |clientHeight|, "scrollWidth": |clientWidth|},
27 )