diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:58 +0000 |
commit | a4b7ed7a42c716ab9f05e351f003d589124fd55d (patch) | |
tree | b620cd3f223850b28716e474e80c58059dca5dd4 /tests/rustdoc-gui/anchor-navigable.goml | |
parent | Adding upstream version 1.67.1+dfsg1. (diff) | |
download | rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip |
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc-gui/anchor-navigable.goml')
-rw-r--r-- | tests/rustdoc-gui/anchor-navigable.goml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/rustdoc-gui/anchor-navigable.goml b/tests/rustdoc-gui/anchor-navigable.goml new file mode 100644 index 000000000..9d5c55a1e --- /dev/null +++ b/tests/rustdoc-gui/anchor-navigable.goml @@ -0,0 +1,11 @@ +// The `impl Foo` heading underneath `Implementations` has a ยง +// anchor to its left (used for linking to that heading). The anchor only shows +// up when hovering the `impl Foo`. This test ensures there's no gap between the +// anchor and the `impl Foo`. If there were a gap, this would cause an annoying +// problem: you hover `impl Foo` to see the anchor, then when you move your +// mouse to the left, the anchor disappears before you reach it. +goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html" +// We check that ".item-info" is bigger than its content. +move-cursor-to: ".impl" +assert-property: (".impl > a.anchor", {"offsetWidth": "8"}) +assert-css: (".impl > a.anchor", {"left": "-8px"}) |