about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2022-10-17 14:20:04 -0700
committerMichael Howell <michael@notriddle.com>2022-10-17 19:26:15 -0700
commitd4e4b08b9b53f3dda7be3cc3bf8881db4180f736 (patch)
tree78fc8d021ad8b0644aa59da4ef0e588d8f875965 /src/test
parentbbac29c0950c780af5a9aea707d4ff30c046be45 (diff)
downloadrust-d4e4b08b9b53f3dda7be3cc3bf8881db4180f736.tar.gz
rust-d4e4b08b9b53f3dda7be3cc3bf8881db4180f736.zip
rustdoc: change mobile breakpoint to match CSS
Since it's possible to have a 700.5px viewport width, the JS needs to not
switch to mobile mode in such a setup.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/rustdoc-gui/sidebar-mobile-scroll.goml8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/rustdoc-gui/sidebar-mobile-scroll.goml b/src/test/rustdoc-gui/sidebar-mobile-scroll.goml
index f1cba172ee3..2449269b192 100644
--- a/src/test/rustdoc-gui/sidebar-mobile-scroll.goml
+++ b/src/test/rustdoc-gui/sidebar-mobile-scroll.goml
@@ -1,12 +1,12 @@
 // This test ensures that the mobile sidebar preserves scroll position.
 goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
 // Switching to "mobile view" by reducing the width to 600px.
-size: (600, 600)
+size: (700, 600)
 assert-css: (".sidebar", {"display": "block", "left": "-1000px"})
 
 // Scroll down.
 scroll-to: "//h2[@id='blanket-implementations']"
-assert-window-property: {"pageYOffset": "651"}
+assert-window-property: {"pageYOffset": "627"}
 
 // Open the sidebar menu.
 click: ".sidebar-menu-toggle"
@@ -21,11 +21,11 @@ assert-window-property: {"pageYOffset": "0"}
 // Close the sidebar menu. Make sure the scroll position gets restored.
 click: ".sidebar-menu-toggle"
 wait-for-css: (".sidebar", {"left": "-1000px"})
-assert-window-property: {"pageYOffset": "651"}
+assert-window-property: {"pageYOffset": "627"}
 
 // Now test that scrollability returns when the browser window is just resized.
 click: ".sidebar-menu-toggle"
 wait-for-css: (".sidebar", {"left": "0px"})
 assert-window-property: {"pageYOffset": "0"}
 size: (900, 600)
-assert-window-property: {"pageYOffset": "651"}
+assert-window-property: {"pageYOffset": "627"}