diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/rustdoc-gui/docblock-table-overflow.goml | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/rustdoc-gui/docblock-table-overflow.goml')
-rw-r--r-- | src/test/rustdoc-gui/docblock-table-overflow.goml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/docblock-table-overflow.goml b/src/test/rustdoc-gui/docblock-table-overflow.goml new file mode 100644 index 000000000..af76d2ea4 --- /dev/null +++ b/src/test/rustdoc-gui/docblock-table-overflow.goml @@ -0,0 +1,21 @@ +// 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"}) +// 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-list > details .docblock", + "#implementations-list > details .docblock > p", + ["scrollWidth"], +) +assert-property: ("#implementations-list > details .docblock", {"scrollWidth": "801"}) +// However, since there is overflow in the <table>, its scroll width is bigger. +assert-property: ("#implementations-list > details .docblock table", {"scrollWidth": "1573"}) |