Skip to content

Commit 8d19d53

Browse files
Update rustdoc-gui test to new browser-ui-test version
1 parent 6d4013d commit 8d19d53

File tree

77 files changed

+149
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+149
-149
lines changed

src/test/rustdoc-gui/anchor-navigable.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// anchor and the `impl Foo`. If there were a gap, this would cause an annoying
55
// problem: you hover `impl Foo` to see the anchor, then when you move your
66
// mouse to the left, the anchor disappears before you reach it.
7-
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
7+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
88
// We check that ".item-info" is bigger than its content.
99
move-cursor-to: ".impl"
1010
assert-property: (".impl > a.anchor", {"offsetWidth": "8"})

src/test/rustdoc-gui/anchors.goml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This test is to ensure that the anchors (`§`) have the expected color and position.
2-
goto: file://|DOC_PATH|/staged_api/struct.Foo.html
2+
goto: "file://" + |DOC_PATH| + "/staged_api/struct.Foo.html"
33

44
// This is needed to ensure that the text color is computed.
55
show-text: true
@@ -36,7 +36,7 @@ assert-css: (
3636
{"color": "rgb(56, 115, 173)", "text-decoration": "none solid rgb(56, 115, 173)"},
3737
)
3838

39-
goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
39+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
4040

4141
assert-css: ("#top-doc-prose-title", {"color": "rgb(0, 0, 0)"})
4242

@@ -57,7 +57,7 @@ assert-css: ("#title-for-struct-impl-item-doc", {"margin-left": "0px"})
5757
// We do the same checks with the dark theme now.
5858
//
5959
local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
60-
goto: file://|DOC_PATH|/staged_api/struct.Foo.html
60+
goto: "file://" + |DOC_PATH| + "/staged_api/struct.Foo.html"
6161

6262
assert-css: ("#toggle-all-docs", {"color": "rgb(221, 221, 221)"})
6363
assert-css: (".fqn a:nth-of-type(1)", {"color": "rgb(221, 221, 221)"})
@@ -86,7 +86,7 @@ assert-css: (
8686
{"color": "rgb(210, 153, 29)", "text-decoration": "none solid rgb(210, 153, 29)"},
8787
)
8888

89-
goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
89+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
9090

9191
assert-css: ("#top-doc-prose-title", {"color": "rgb(221, 221, 221)"})
9292

@@ -107,7 +107,7 @@ assert-css: ("#title-for-struct-impl-item-doc", {"margin-left": "0px"})
107107
// We do the same checks with the ayu theme now.
108108
//
109109
local-storage: {"rustdoc-theme": "ayu", "rustdoc-use-system-theme": "false"}
110-
goto: file://|DOC_PATH|/staged_api/struct.Foo.html
110+
goto: "file://" + |DOC_PATH| + "/staged_api/struct.Foo.html"
111111

112112
assert-css: ("#toggle-all-docs", {"color": "rgb(197, 197, 197)"})
113113
assert-css: (".fqn a:nth-of-type(1)", {"color": "rgb(255, 255, 255)"})
@@ -136,7 +136,7 @@ assert-css: (
136136
{"color": "rgb(57, 175, 215)", "text-decoration": "none solid rgb(57, 175, 215)"},
137137
)
138138

139-
goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
139+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
140140

141141
assert-css: ("#top-doc-prose-title", {"color": "rgb(255, 255, 255)"})
142142

src/test/rustdoc-gui/auto-hide-trait-implementations.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Checks that the setting "auto hide trait implementations" is working as expected.
2-
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
2+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
33

44
// By default, the trait implementations are not collapsed.
55
assert-attribute: ("#trait-implementations-list > details", {"open": ""}, ALL)

src/test/rustdoc-gui/basic-code.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
goto: file://|DOC_PATH|/test_docs/index.html
1+
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
22
click: ".srclink"
33
assert-count: (".src-line-numbers", 1)

src/test/rustdoc-gui/basic.goml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
goto: file://|DOC_PATH|/test_docs/index.html
1+
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
22
assert: ("#functions")
3-
goto: ./struct.Foo.html
3+
goto: "./struct.Foo.html"
44
assert: ("div.item-decl")

src/test/rustdoc-gui/check-code-blocks-margin.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This test ensures that the docblock elements have the appropriate left margin.
2-
goto: file://|DOC_PATH|/test_docs/fn.foo.html
2+
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
33
// The top docblock elements shouldn't have left margin...
44
assert-css: ("#main-content .item-decl", {"margin-left": "0px"})
55
// ... but all the others should!

src/test/rustdoc-gui/check-stab-in-docblock.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This test checks that using `.stab` attributes in `.docblock` elements doesn't
22
// create scrollable paragraphs.
3-
goto: file://|DOC_PATH|/test_docs/index.html
3+
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
44
// Needs the text to be display to check for scrollable content.
55
show-text: true
66
size: (786, 600)

src/test/rustdoc-gui/check_info_sign_position.goml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This test checks the position of the information on the code blocks (like
22
// `compile_fail` or `ignore`).
3-
goto: file://|DOC_PATH|/test_docs/index.html
4-
goto: ./fn.check_list_code_block.html
3+
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
4+
goto: "./fn.check_list_code_block.html"
55
// If the codeblock is the first element of the docblock, the information tooltip must have
66
// have some top margin to avoid going over the toggle (the "[+]").
77
assert-css: (".docblock > .example-wrap.compile_fail .tooltip", { "margin-top": "16px" })

src/test/rustdoc-gui/code-blocks-overflow.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This test ensures that codeblocks content don't overflow.
2-
goto: file://|DOC_PATH|/lib2/sub_mod/struct.Foo.html
2+
goto: "file://" + |DOC_PATH| + "/lib2/sub_mod/struct.Foo.html"
33
size: (1080, 600)
44
// There should be two codeblocks: a rust one and a non-rust one.
55
assert-count: (".docblock > .example-wrap", 2)

src/test/rustdoc-gui/code-color.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// check that the rule isn't applied on other "<code>" elements.
33
//
44
// While we're at it, we also check it for the other themes.
5-
goto: file://|DOC_PATH|/test_docs/fn.foo.html
5+
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
66
// If the text isn't displayed, the browser doesn't compute color style correctly...
77
show-text: true
88
// Set the theme to dark.

src/test/rustdoc-gui/code-sidebar-toggle.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This test checks that the source code pages sidebar toggle is working as expected.
2-
goto: file://|DOC_PATH|/test_docs/index.html
2+
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
33
click: ".srclink"
44
wait-for: "#sidebar-toggle"
55
click: "#sidebar-toggle"

src/test/rustdoc-gui/code-tags.goml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
// This test ensures that items and documentation code blocks are wrapped in <pre><code>
2-
goto: file://|DOC_PATH|/test_docs/fn.foo.html
2+
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
33
size: (1080, 600)
44
// There should be four doc codeblocks.
55
// Check that their content is inside <pre><code>
66
assert-count: (".example-wrap pre > code", 4)
77
// Check that function signature is inside <pre><code>
88
assert: "pre.rust.fn > code"
99

10-
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
10+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
1111
assert: "pre.rust.struct > code"
1212

13-
goto: file://|DOC_PATH|/test_docs/enum.AnEnum.html
13+
goto: "file://" + |DOC_PATH| + "/test_docs/enum.AnEnum.html"
1414
assert: "pre.rust.enum > code"
1515

16-
goto: file://|DOC_PATH|/test_docs/trait.AnotherOne.html
16+
goto: "file://" + |DOC_PATH| + "/test_docs/trait.AnotherOne.html"
1717
assert: "pre.rust.trait > code"
1818

19-
goto: file://|DOC_PATH|/test_docs/type.SomeType.html
19+
goto: "file://" + |DOC_PATH| + "/test_docs/type.SomeType.html"
2020
assert: "pre.rust.typedef > code"

src/test/rustdoc-gui/codeblock-tooltip.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Checking the colors of the codeblocks tooltips.
2-
goto: file://|DOC_PATH|/test_docs/fn.foo.html
2+
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
33
show-text: true
44

55
// Dark theme.

src/test/rustdoc-gui/default-settings.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// The "settings" crate uses "ayu" as default setting, which is what we will
44
// check.
5-
goto: file://|DOC_PATH|/settings/index.html
5+
goto: "file://" + |DOC_PATH| + "/settings/index.html"
66
// Wait a bit to be sure the default theme is applied.
77
// If the theme isn't applied, the command will time out.
88
wait-for-css: ("body", {"background-color": "rgb(15, 20, 25)"})

src/test/rustdoc-gui/docblock-big-code-mobile.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// If we have a long `<code>`, we need to ensure that it'll be fully displayed on mobile, meaning
22
// that it'll be on two lines.
33
emulate: "iPhone 8" // it has the following size: (375, 667)
4-
goto: file://|DOC_PATH|/test_docs/long_code_block/index.html
4+
goto: "file://" + |DOC_PATH| + "/test_docs/long_code_block/index.html"
55
// We now check that the block is on two lines:
66
show-text: true // We need to enable text draw to be able to have the "real" size
77
// Little explanations for this test: if the text wasn't displayed on two lines, it would take

src/test/rustdoc-gui/docblock-code-block-line-number.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Checks that the setting "line numbers" is working as expected.
2-
goto: file://|DOC_PATH|/test_docs/fn.foo.html
2+
goto: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
33

44
// We check that without this setting, there is no line number displayed.
55
assert-false: "pre.example-line-numbers"

src/test/rustdoc-gui/docblock-details.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This ensures that the `<details>`/`<summary>` elements are displayed as expected.
2-
goto: file://|DOC_PATH|/test_docs/details/struct.Details.html
2+
goto: "file://" + |DOC_PATH| + "/test_docs/details/struct.Details.html"
33
show-text: true
44
local-storage: {"rustdoc-theme": "dark", "rustdoc-use-system-theme": "false"}
55
reload:

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This test ensures that the type declaration content overflow is handled inside the <pre> directly.
2-
goto: file://|DOC_PATH|/lib2/long_table/struct.Foo.html
2+
goto: "file://" + |DOC_PATH| + "/lib2/long_table/struct.Foo.html"
33
// We set a fixed size so there is no chance of "random" resize.
44
size: (1100, 800)
55
// Logically, the ".docblock" and the "<p>" should have the same scroll width.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
goto: file://|DOC_PATH|/test_docs/doc_block_table/struct.DocBlockTable.html#method.func
1+
goto: "file://" + |DOC_PATH| + "/test_docs/doc_block_table/struct.DocBlockTable.html#method.func"
22

33
compare-elements-css: (".impl-items .docblock table th", ".top-doc .docblock table th", ["border"])
44
compare-elements-css: (".impl-items .docblock table td", ".top-doc .docblock table td", ["border"])

src/test/rustdoc-gui/duplicate-macro-reexport.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This test ensures that there is no macro duplicates in the sidebar.
2-
goto: file://|DOC_PATH|/test_docs/macro.a.html
2+
goto: "file://" + |DOC_PATH| + "/test_docs/macro.a.html"
33
// Waiting for the elements in the sidebar to be rendered.
44
wait-for: ".sidebar-elems .macro"
55
// Check there is only one macro named "a" listed in the sidebar.

src/test/rustdoc-gui/escape-key.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This test ensures that the "Escape" shortcut is handled correctly based on the
22
// current content displayed.
3-
goto: file://|DOC_PATH|/test_docs/index.html
3+
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
44
// First, we check that the search results are hidden when the Escape key is pressed.
55
write: (".search-input", "test")
66
// To be SURE that the search will be run.

src/test/rustdoc-gui/font-weight.goml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This test checks that the font weight is correctly applied.
2-
goto: file://|DOC_PATH|/lib2/struct.Foo.html
2+
goto: "file://" + |DOC_PATH| + "/lib2/struct.Foo.html"
33
assert-css: ("//*[@class='item-decl']//a[text()='Alias']", {"font-weight": "400"})
44
assert-css: (
55
"//*[@class='structfield small-section-header']//a[text()='Alias']",
@@ -9,13 +9,13 @@ assert-css: ("#method\.a_method > .code-header", {"font-weight": "600"})
99
assert-css: ("#associatedtype\.X > .code-header", {"font-weight": "600"})
1010
assert-css: ("#associatedconstant\.Y > .code-header", {"font-weight": "600"})
1111

12-
goto: file://|DOC_PATH|/test_docs/type.SomeType.html
12+
goto: "file://" + |DOC_PATH| + "/test_docs/type.SomeType.html"
1313
assert-css: (".top-doc .docblock p", {"font-weight": "400"}, ALL)
1414

15-
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
15+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
1616
assert-css: (".impl-items .method > .code-header", {"font-weight": "600"}, ALL)
1717

18-
goto: file://|DOC_PATH|/lib2/trait.Trait.html
18+
goto: "file://" + |DOC_PATH| + "/lib2/trait.Trait.html"
1919

2020
// This is a complex selector, so here's how it works:
2121
//

src/test/rustdoc-gui/hash-item-expansion.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This test ensures that the element corresponding to the hash is displayed.
2-
goto: file://|DOC_PATH|/test_docs/struct.Foo.html#method.borrow
2+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.borrow"
33
// In the blanket implementations list, "Borrow" is the second one, hence the ":nth(2)".
44
assert-attribute: ("#blanket-implementations-list > details:nth-child(2)", {"open": ""})
55
// We first check that the impl block is open by default.

src/test/rustdoc-gui/headers-color.goml

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This test check for headers text and background colors for the different themes.
2-
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
2+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
33

44
// This is needed so that the text color is computed.
55
show-text: true
@@ -23,23 +23,23 @@ assert-css: (
2323
ALL,
2424
)
2525

26-
goto: file://|DOC_PATH|/test_docs/struct.Foo.html#impl-Foo
26+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#impl-Foo"
2727
assert-css: (
2828
"#impl-Foo",
2929
{"color": "rgb(197, 197, 197)", "background-color": "rgba(255, 236, 164, 0.06)"},
3030
)
3131

32-
goto: file://|DOC_PATH|/test_docs/struct.Foo.html#method.must_use
32+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.must_use"
3333
assert-css: (
3434
"#method\.must_use",
3535
{"color": "rgb(197, 197, 197)", "background-color": "rgba(255, 236, 164, 0.06)"},
3636
ALL,
3737
)
3838

39-
goto: file://|DOC_PATH|/test_docs/index.html
39+
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
4040
assert-css: (".small-section-header a", {"color": "rgb(197, 197, 197)"}, ALL)
4141

42-
goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
42+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
4343
// We select headings (h2, h3, h...).
4444
assert-css: (".docblock > :not(p) > a", {"color": "rgb(57, 175, 215)"}, ALL)
4545

@@ -49,7 +49,7 @@ local-storage: {
4949
"rustdoc-preferred-dark-theme": "dark",
5050
"rustdoc-use-system-theme": "false",
5151
}
52-
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
52+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
5353

5454
assert-css: (
5555
".impl",
@@ -62,31 +62,31 @@ assert-css: (
6262
ALL,
6363
)
6464

65-
goto: file://|DOC_PATH|/test_docs/struct.Foo.html#impl-Foo
65+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#impl-Foo"
6666
assert-css: (
6767
"#impl-Foo",
6868
{"color": "rgb(221, 221, 221)", "background-color": "rgb(73, 74, 61)"},
6969
)
7070

71-
goto: file://|DOC_PATH|/test_docs/struct.Foo.html#method.must_use
71+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.must_use"
7272
assert-css: (
7373
"#method\.must_use",
7474
{"color": "rgb(221, 221, 221)", "background-color": "rgb(73, 74, 61)"},
7575
ALL,
7676
)
7777

78-
goto: file://|DOC_PATH|/test_docs/index.html
78+
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
7979
assert-css: (".small-section-header a", {"color": "rgb(221, 221, 221)"}, ALL)
8080

81-
goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
81+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
8282
// We select headings (h2, h3, h...).
8383
assert-css: (".docblock > :not(p) > a", {"color": "rgb(210, 153, 29)"}, ALL)
8484

8585
// Light theme
8686
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
8787
reload:
8888

89-
goto: file://|DOC_PATH|/test_docs/struct.Foo.html
89+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
9090

9191
assert-css: (
9292
".impl",
@@ -99,19 +99,19 @@ assert-css: (
9999
ALL,
100100
)
101101

102-
goto: file://|DOC_PATH|/test_docs/struct.Foo.html#impl-Foo
102+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#impl-Foo"
103103
assert-css: ("#impl-Foo", {"color": "rgb(0, 0, 0)", "background-color": "rgb(253, 255, 211)"})
104104

105-
goto: file://|DOC_PATH|/test_docs/struct.Foo.html#method.must_use
105+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html#method.must_use"
106106
assert-css: (
107107
"#method\.must_use",
108108
{"color": "rgb(0, 0, 0)", "background-color": "rgb(253, 255, 211)"},
109109
ALL,
110110
)
111111

112-
goto: file://|DOC_PATH|/test_docs/index.html
112+
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
113113
assert-css: (".small-section-header a", {"color": "rgb(0, 0, 0)"}, ALL)
114114

115-
goto: file://|DOC_PATH|/test_docs/struct.HeavilyDocumentedStruct.html
115+
goto: "file://" + |DOC_PATH| + "/test_docs/struct.HeavilyDocumentedStruct.html"
116116
// We select headings (h2, h3, h...).
117117
assert-css: (".docblock > :not(p) > a", {"color": "rgb(56, 115, 173)"}, ALL)

0 commit comments

Comments
 (0)