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.
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"})
10 // In the table-ish view on the module index, the name should not be wrapped more than necessary.
11 goto: file://|DOC_PATH|/lib2/too_long/index.html
12 assert-property: (".item-table .struct", {"offsetWidth": "684"})
14 // We now make the same check on type declaration...
15 goto: file://|DOC_PATH|/lib2/too_long/type.ReallyLongTypeNameLongLongLong.html
16 assert-property: ("body", {"scrollWidth": "1100"})
17 // We now check that the section width hasn't grown because of it.
18 assert-property: ("#main-content", {"scrollWidth": "840"})
19 // And now checking that it has scrollable content.
20 assert-property: (".item-decl pre", {"scrollWidth": "1103"})
23 // On a sidenote, it also checks that the (very) long title isn't changing the docblock width.
24 goto: file://|DOC_PATH|/lib2/too_long/constant.ReallyLongTypeNameLongLongLongConstBecauseWhyNotAConstRightGigaGigaSupraLong.html
25 assert-property: ("body", {"scrollWidth": "1100"})
26 // We now check that the section width hasn't grown because of it.
27 assert-property: ("#main-content", {"scrollWidth": "840"})
28 // And now checking that it has scrollable content.
29 assert-property: (".item-decl pre", {"scrollWidth": "950"})
33 goto: file://|DOC_PATH|/lib2/too_long/struct.SuperIncrediblyLongLongLongLongLongLongLongGigaGigaGigaMegaLongLongLongStructName.html
34 // It shouldn't have an overflow in the topbar either.
35 store-property: (scrollWidth, ".mobile-topbar .location", "scrollWidth")
36 assert-property: (".mobile-topbar .location", {"clientWidth": |scrollWidth|})
37 assert-css: (".mobile-topbar .location", {"overflow-x": "hidden"})