]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc-gui/docblock-table-overflow.goml
Auto merge of #107778 - weihanglo:update-cargo, r=weihanglo
[rust.git] / tests / rustdoc-gui / docblock-table-overflow.goml
1 // This test ensures that the type declaration content overflow is handled inside the <pre> directly.
2 goto: "file://" + |DOC_PATH| + "/lib2/long_table/struct.Foo.html"
3 // We set a fixed size so there is no chance of "random" resize.
4 size: (1100, 800)
5 // Logically, the ".docblock" and the "<p>" should have the same scroll width.
6 compare-elements-property: (".top-doc .docblock", ".top-doc .docblock > p", ["scrollWidth"])
7 assert-property: (".top-doc .docblock", {"scrollWidth": "816"})
8 // However, since there is overflow in the <table>, its scroll width is bigger.
9 assert-property: (".top-doc .docblock table", {"scrollWidth": "1572"})
10
11 // Checking it works on other doc blocks as well...
12
13 // Logically, the ".docblock" and the "<p>" should have the same scroll width.
14 compare-elements-property: (
15     "#implementations-list > details .docblock",
16     "#implementations-list > details .docblock > p",
17     ["scrollWidth"],
18 )
19 assert-property: ("#implementations-list > details .docblock", {"scrollWidth": "816"})
20 // However, since there is overflow in the <table>, its scroll width is bigger.
21 assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1572"})