]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc-gui/type-declation-overflow.goml
Rollup merge of #91566 - cbeuw:remap-dwo-name, r=davidtwco
[rust.git] / src / test / rustdoc-gui / type-declation-overflow.goml
1 // This test ensures that the items declaration content overflow is handled inside the <pre> directly.
2 goto: file://|DOC_PATH|/lib2/long_trait/trait.ALongNameBecauseItHelpsTestingTheCurrentProblem.html
3 // We set a fixed size so there is no chance of "random" resize.
4 size: (1100, 800)
5 // Logically, the <body> scroll width should be the width of the window.
6 assert-property: ("body", {"scrollWidth": "1100"})
7 // However, since there is overflow in the type declaration, its scroll width is bigger.
8 assert-property: (".item-decl pre", {"scrollWidth": "1324"})
9
10 // We now make the same check on type declaration...
11 goto: file://|DOC_PATH|/lib2/too_long/type.ReallyLongTypeNameLongLongLong.html
12 assert-property: ("body", {"scrollWidth": "1100"})
13 // We now check that the section width hasn't grown because of it.
14 assert-property: ("#main-content", {"scrollWidth": "840"})
15 // And now checking that it has scrollable content.
16 assert-property: (".item-decl pre", {"scrollWidth": "1103"})
17
18 // ... and constant.
19 // On a sidenote, it also checks that the (very) long title isn't changing the docblock width.
20 goto: file://|DOC_PATH|/lib2/too_long/constant.ReallyLongTypeNameLongLongLongConstBecauseWhyNotAConstRightGigaGigaSupraLong.html
21 assert-property: ("body", {"scrollWidth": "1100"})
22 // We now check that the section width hasn't grown because of it.
23 assert-property: ("#main-content", {"scrollWidth": "840"})
24 // And now checking that it has scrollable content.
25 assert-property: (".item-decl pre", {"scrollWidth": "950"})