@@ -111,28 +111,6 @@ wait-for: "pre.example-line-numbers"
111111// Same check with scraped examples line numbers.
112112go-to: "file://" + |DOC_PATH| + "/scrape_examples/fn.test_many.html"
113113
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- )
136114assert-css: (
137115 ".scraped-example .rust",
138116 {
@@ -149,23 +127,15 @@ define-function: (
149127 "check-padding",
150128 [path, padding_bottom],
151129 block {
152- assert-css: (|path| + " .src-line-numbers ", {
130+ assert-css: (|path| + " span[data-nosnippet] ", {
153131 "padding-top": "0px",
154132 "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",
169139 }, ALL)
170140 },
171141)
@@ -196,13 +166,13 @@ define-function: ("check-line-numbers-existence", [], block {
196166 wait-for-local-storage-false: {"rustdoc-line-numbers": "true" }
197167 assert-false: ".example-line-numbers"
198168 // Line numbers should still be there.
199- assert: ".src-line-numbers"
169+ assert-css: ("[data-nosnippet]", { "display": "inline-block"})
200170 // Now disabling the setting.
201171 click: "input#line-numbers"
202172 wait-for-local-storage: {"rustdoc-line-numbers": "true" }
203173 assert-false: ".example-line-numbers"
204174 // Line numbers should still be there.
205- assert: ".src-line-numbers"
175+ assert-css: ("[data-nosnippet]", { "display": "inline-block"})
206176 // Closing settings menu.
207177 click: "#settings-menu"
208178 wait-for-css: ("#settings", {"display": "none"})
@@ -214,18 +184,16 @@ call-function: ("check-line-numbers-existence", {})
214184
215185// Now checking the line numbers in the source code page.
216186click: ".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]", {
224188 "padding-top": "0px",
225189 "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)
229197// Checking that turning off the line numbers setting won't remove line numbers.
230198call-function: ("check-line-numbers-existence", {})
231199
0 commit comments