@@ -111,28 +111,6 @@ wait-for: "pre.example-line-numbers"
111
111
// Same check with scraped examples line numbers.
112
112
go-to: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
113
113
114
- assert-css: (
115
- ".scraped-example .src-line-numbers > pre",
116
- {
117
- // There should not be a radius on the right of the line numbers.
118
- "border-top-left-radius": "6px",
119
- "border-bottom-left-radius": "6px",
120
- "border-top-right-radius": "0px",
121
- "border-bottom-right-radius": "0px",
122
- },
123
- ALL,
124
- )
125
- assert-css: (
126
- ".scraped-example .src-line-numbers",
127
- {
128
- // There should not be a radius on the right of the line numbers.
129
- "border-top-left-radius": "6px",
130
- "border-bottom-left-radius": "6px",
131
- "border-top-right-radius": "0px",
132
- "border-bottom-right-radius": "0px",
133
- },
134
- ALL,
135
- )
136
114
assert-css: (
137
115
".scraped-example .rust",
138
116
{
@@ -149,23 +127,15 @@ define-function: (
149
127
"check-padding",
150
128
[path, padding_bottom],
151
129
block {
152
- assert-css: (|path| + " .src-line-numbers ", {
130
+ assert-css: (|path| + " span[data-nosnippet] ", {
153
131
"padding-top": "0px",
154
132
"padding-bottom": "0px",
155
- "padding-left": "0px",
156
- "padding-right": "0px",
157
- }, ALL)
158
- assert-css: (|path| + " .src-line-numbers > pre", {
159
- "padding-top": "14px",
160
- "padding-bottom": |padding_bottom|,
161
- "padding-left": "0px",
162
- "padding-right": "0px",
163
- }, ALL)
164
- assert-css: (|path| + " .src-line-numbers > pre > span", {
165
- "padding-top": "0px",
166
- "padding-bottom": "0px",
167
- "padding-left": "8px",
168
- "padding-right": "8px",
133
+ "padding-left": "4px",
134
+ "padding-right": "4px",
135
+ "margin-right": "20px",
136
+ "margin-left": "0px",
137
+ "margin-top": "0px",
138
+ "margin-bottom": "0px",
169
139
}, ALL)
170
140
},
171
141
)
@@ -196,13 +166,13 @@ define-function: ("check-line-numbers-existence", [], block {
196
166
wait-for-local-storage-false: {"rustdoc-line-numbers": "true" }
197
167
assert-false: ".example-line-numbers"
198
168
// Line numbers should still be there.
199
- assert: ".src-line-numbers"
169
+ assert-css: ("[data-nosnippet]", { "display": "inline-block"})
200
170
// Now disabling the setting.
201
171
click: "input#line-numbers"
202
172
wait-for-local-storage: {"rustdoc-line-numbers": "true" }
203
173
assert-false: ".example-line-numbers"
204
174
// Line numbers should still be there.
205
- assert: ".src-line-numbers"
175
+ assert-css: ("[data-nosnippet]", { "display": "inline-block"})
206
176
// Closing settings menu.
207
177
click: "#settings-menu"
208
178
wait-for-css: ("#settings", {"display": "none"})
@@ -214,18 +184,16 @@ call-function: ("check-line-numbers-existence", {})
214
184
215
185
// Now checking the line numbers in the source code page.
216
186
click: ".src"
217
- assert-css: (".src-line-numbers", {
218
- "padding-top": "20px",
219
- "padding-bottom": "20px",
220
- "padding-left": "4px",
221
- "padding-right": "0px",
222
- })
223
- assert-css: (".src-line-numbers > a", {
187
+ assert-css: ("a[data-nosnippet]", {
224
188
"padding-top": "0px",
225
189
"padding-bottom": "0px",
226
- "padding-left": "8px",
227
- "padding-right": "8px",
228
- })
190
+ "padding-left": "4px",
191
+ "padding-right": "4px",
192
+ "margin-top": "0px",
193
+ "margin-bottom": "0px",
194
+ "margin-left": "0px",
195
+ "margin-right": "20px",
196
+ }, ALL)
229
197
// Checking that turning off the line numbers setting won't remove line numbers.
230
198
call-function: ("check-line-numbers-existence", {})
231
199
0 commit comments