@@ -5,6 +5,18 @@ go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
5
5
// We check that without this setting, there is no line number displayed.
6
6
assert-false: "pre.example-line-numbers"
7
7
8
+ // All corners should be rounded.
9
+ assert-css: (
10
+ ".example-wrap .rust",
11
+ {
12
+ "border-top-left-radius": "6px",
13
+ "border-bottom-left-radius": "6px",
14
+ "border-top-right-radius": "6px",
15
+ "border-bottom-right-radius": "6px",
16
+ },
17
+ ALL,
18
+ )
19
+
8
20
// We set the setting to show the line numbers on code examples.
9
21
set-local-storage: {"rustdoc-line-numbers": "true"}
10
22
reload:
@@ -29,9 +41,21 @@ define-function: (
29
41
"margin": "0px",
30
42
"padding": "14px 8px",
31
43
"text-align": "right",
44
+ // There should not be a radius on the right of the line numbers.
45
+ "border-top-left-radius": "6px",
46
+ "border-bottom-left-radius": "6px",
47
+ "border-top-right-radius": "0px",
48
+ "border-bottom-right-radius": "0px",
32
49
},
33
50
ALL,
34
51
)
52
+ // There should not be a radius on the left of the line numbers.
53
+ assert-css: ("pre.example-line-numbers + .rust", {
54
+ "border-top-left-radius": "0px",
55
+ "border-bottom-left-radius": "0px",
56
+ "border-top-right-radius": "6px",
57
+ "border-bottom-right-radius": "6px",
58
+ })
35
59
},
36
60
)
37
61
call-function: ("check-colors", {
@@ -64,6 +88,18 @@ wait-for: 100 // wait-for-false does not exist
64
88
assert-false: "pre.example-line-numbers"
65
89
assert-local-storage: {"rustdoc-line-numbers": "false" }
66
90
91
+ // Check that the rounded corners are back.
92
+ assert-css: (
93
+ ".example-wrap .rust",
94
+ {
95
+ "border-top-left-radius": "6px",
96
+ "border-bottom-left-radius": "6px",
97
+ "border-top-right-radius": "6px",
98
+ "border-bottom-right-radius": "6px",
99
+ },
100
+ ALL,
101
+ )
102
+
67
103
// Finally, turn it on again.
68
104
click: "input#line-numbers"
69
105
wait-for: "pre.example-line-numbers"
0 commit comments