File tree 2 files changed +40
-0
lines changed
2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ // This test ensures that several clickable items actually have the pointer cursor.
2
+ go-to: "file://" + |DOC_PATH| + "/lib2/struct.Derefer.html"
3
+
4
+ assert-text: (".big-toggle summary", "Methods from Deref<Target = str>§")
5
+ // We ensure it doesn't go over `§`.
6
+ assert-css: (".big-toggle summary::before", {
7
+ "left": "-34px",
8
+ "top": "9px",
9
+ })
10
+ // It should NOT have the same X or Y position as the other toggles.
11
+ compare-elements-position-false: (
12
+ ".big-toggle summary::before",
13
+ ".method-toggle summary::before",
14
+ ["x", "y"],
15
+ )
16
+
17
+ // We now check that if we're in mobile mode, it gets back to its original X position.
18
+ set-window-size: (600, 600)
19
+ assert-css: (".big-toggle summary::before", {
20
+ "left": "-11px",
21
+ "top": "9px",
22
+ })
23
+ // It should have the same X position as the other toggles.
24
+ compare-elements-position: (".big-toggle summary::before", ".method-toggle summary::before", ["x"])
25
+ // But still shouldn't have the same Y position.
26
+ compare-elements-position-false: (
27
+ ".big-toggle summary::before",
28
+ ".method-toggle summary::before",
29
+ ["y"],
30
+ )
Original file line number Diff line number Diff line change @@ -355,3 +355,13 @@ pub mod scroll_traits {
355
355
fn this_is_a_method_with_a_long_name_returning_something ( ) -> String ;
356
356
}
357
357
}
358
+
359
+ pub struct Derefer ( String ) ;
360
+
361
+ impl std:: ops:: Deref for Derefer {
362
+ type Target = str ;
363
+
364
+ fn deref ( & self ) -> & Self :: Target {
365
+ & self . 0
366
+ }
367
+ }
You can’t perform that action at this time.
0 commit comments