Skip to content

Commit 77f980f

Browse files
authored
Rollup merge of #145669 - notriddle:test-js-search-scripts-path, r=GuillaumeGomez
rustdoc-search: GUI tests check for `//` in URL Follow up #145650 When this fails, you get output that looks like: /home/user/rust/tests/rustdoc-gui/search-result-impl-disambiguation.goml search-result-impl-disambiguation... FAILED [ERROR] `tests/rustdoc-gui/utils.goml` around line 49 from `tests/rustdoc-gui/search-result-impl-disambiguation.goml` line 25: JS errors occurred: Event: Event Making the error message more informative requires patching browser-ui-test.
2 parents 15eedde + 53b775d commit 77f980f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/rustdoc-gui/utils.goml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ define-function: (
3939
"perform-search",
4040
[query],
4141
block {
42+
// Block requests with doubled `//`.
43+
// Amazon S3 doesn't support them, but other web hosts do,
44+
// and so do file:/// URLs, which means we need to block
45+
// it here if we want to avoid breaking the main docs site.
46+
// https://github.com/rust-lang/rust/issues/145646
47+
block-network-request: "file://*//*"
48+
// Perform search
4249
click: "#search-button"
4350
wait-for: ".search-input"
4451
write-into: (".search-input", |query|)

0 commit comments

Comments
 (0)