-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #86542 - GuillaumeGomez:line-numbers-aligned-with-con…
…tent, r=jyn514 Line numbers aligned with content We had the issue a few times in the past where the source code pages' content wasn't aligned with the line numbers but completely below. This test will prevent this change to go unnoticed. The first commit comes from #86541 so it needs it to be merged first. r? `@jsha`
- Loading branch information
Showing
9 changed files
with
42 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
// This test ensures that the element corresponding to the hash is displayed. | ||
goto: file://|DOC_PATH|/test_docs/struct.Foo.html#method.borrow | ||
// In the blanket implementations list, "Borrow" is the second one, hence the ":nth(2)". | ||
assert-attr: ("#blanket-implementations-list > details:nth-child(2)", {"open": ""}) | ||
assert-attribute: ("#blanket-implementations-list > details:nth-child(2)", {"open": ""}) | ||
// We first check that the impl block is open by default. | ||
assert-attr: ("#implementations + details", {"open": ""}) | ||
assert-attribute: ("#implementations + details", {"open": ""}) | ||
// We collapse it. | ||
click: "#implementations + details > summary" | ||
// We check that it was collapsed as expected. | ||
assert-attr-false: ("#implementations + details", {"open": ""}) | ||
assert-attribute-false: ("#implementations + details", {"open": ""}) | ||
// To ensure that we will click on the currently hidden method. | ||
assert-text: (".sidebar-links > a", "must_use") | ||
click: ".sidebar-links > a" | ||
// We check that the impl block was opened as expected so that we can see the method. | ||
assert-attr: ("#implementations + details", {"open": ""}) | ||
assert-attribute: ("#implementations + details", {"open": ""}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// This test ensures that the impl blocks are open by default. | ||
goto: file://|DOC_PATH|/test_docs/struct.Foo.html | ||
assert-attr: ("#main > details.implementors-toggle", {"open": ""}) | ||
assert-attribute: ("#main > details.implementors-toggle", {"open": ""}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
goto: file://|DOC_PATH|/test_docs/struct.Foo.html | ||
size: (433, 600) | ||
assert-attr: (".top-doc", {"open": ""}) | ||
assert-attribute: (".top-doc", {"open": ""}) | ||
click: (4, 280) // This is the position of the top doc comment toggle | ||
assert-attr-false: (".top-doc", {"open": ""}) | ||
assert-attribute-false: (".top-doc", {"open": ""}) | ||
click: (4, 280) | ||
assert-attr: (".top-doc", {"open": ""}) | ||
assert-attribute: (".top-doc", {"open": ""}) | ||
// To ensure that the toggle isn't over the text, we check that the toggle isn't clicked. | ||
click: (3, 280) | ||
assert-attr: (".top-doc", {"open": ""}) | ||
assert-attribute: (".top-doc", {"open": ""}) | ||
|
||
// Now we do the same but with a little bigger width | ||
size: (600, 600) | ||
assert-attr: (".top-doc", {"open": ""}) | ||
assert-attribute: (".top-doc", {"open": ""}) | ||
click: (4, 240) // New Y position since all search elements are back on one line. | ||
assert-attr-false: (".top-doc", {"open": ""}) | ||
assert-attribute-false: (".top-doc", {"open": ""}) | ||
click: (4, 240) | ||
assert-attr: (".top-doc", {"open": ""}) | ||
assert-attribute: (".top-doc", {"open": ""}) | ||
// To ensure that the toggle isn't over the text, we check that the toggle isn't clicked. | ||
click: (3, 240) | ||
assert-attr: (".top-doc", {"open": ""}) | ||
assert-attribute: (".top-doc", {"open": ""}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
goto: file://|DOC_PATH|/test_docs/index.html | ||
assert-attr: ("#main > details.top-doc", {"open": ""}) | ||
assert-attribute: ("#main > details.top-doc", {"open": ""}) | ||
click: "#toggle-all-docs" | ||
wait-for: 1000 | ||
// This is now collapsed so there shouldn't be the "open" attribute on details. | ||
assert-attr-false: ("#main > details.top-doc", {"open": ""}) | ||
assert-attribute-false: ("#main > details.top-doc", {"open": ""}) | ||
click: "#toggle-all-docs" | ||
wait-for: 1000 | ||
// Not collapsed anymore so the "open" attribute should be back. | ||
assert-attr: ("#main > details.top-doc", {"open": ""}) | ||
assert-attribute: ("#main > details.top-doc", {"open": ""}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters