rust/src/test/rustdoc-gui/docblock-table-overflow.goml

22 lines
1.1 KiB
Plaintext
Raw Normal View History

2021-07-17 17:03:08 -05:00
// This test ensures that the type declaration content overflow is handled inside the <pre> directly.
goto: file://|DOC_PATH|/lib2/long_table/struct.Foo.html
// We set a fixed size so there is no chance of "random" resize.
size: (1100, 800)
// Logically, the ".docblock" and the "<p>" should have the same scroll width.
compare-elements-property: (".top-doc .docblock", ".top-doc .docblock > p", ["scrollWidth"])
assert-property: (".top-doc .docblock", {"scrollWidth": "801"})
2021-07-17 17:03:08 -05:00
// However, since there is overflow in the <table>, its scroll width is bigger.
assert-property: (".top-doc .docblock table", {"scrollWidth": "1573"})
// Checking it works on other doc blocks as well...
// Logically, the ".docblock" and the "<p>" should have the same scroll width.
compare-elements-property: (
"#implementations + details .docblock",
"#implementations + details .docblock > p",
["scrollWidth"],
)
assert-property: ("#implementations + details .docblock", {"scrollWidth": "801"})
// However, since there is overflow in the <table>, its scroll width is bigger.
assert-property: ("#implementations + details .docblock table", {"scrollWidth": "1573"})