rustdoc: make the header show all three buttons
This tweaks it to use less space for the breadcrumbs.
This commit is contained in:
parent
d05323c7b4
commit
5b1b2e97e3
26 changed files with 154 additions and 102 deletions
|
@ -89,7 +89,7 @@ assert-css: (".src-line-numbers", {"text-align": "right"})
|
|||
// do anything (and certainly not add a `#NaN` to the URL!).
|
||||
go-to: "file://" + |DOC_PATH| + "/src/test_docs/lib.rs.html"
|
||||
// We use this assert-position to know where we will click.
|
||||
assert-position: ("//*[@id='1']", {"x": 88, "y": 162})
|
||||
assert-position: ("//*[@id='1']", {"x": 88, "y": 163})
|
||||
// We click on the left of the "1" anchor but still in the "src-line-number" `<pre>`.
|
||||
click: (163, 77)
|
||||
assert-document-property: ({"URL": "/lib.rs.html"}, ENDS_WITH)
|
||||
|
@ -159,19 +159,21 @@ call-function: ("check-sidebar-dir-entry", {
|
|||
// Check the search form
|
||||
assert-css: ("nav.sub", {"flex-direction": "row"})
|
||||
// The goal of this test is to ensure the search input is perfectly centered
|
||||
// between the top of the page and the top of the gray code block.
|
||||
// between the top of the page and the header.
|
||||
// To check this, we maintain the invariant:
|
||||
//
|
||||
// offsetTop[nav.sub form] = offsetTop[#main-content] - offsetHeight[nav.sub form] - offsetTop[nav.sub form]
|
||||
assert-property: ("nav.sub form", {"offsetTop": 15, "offsetHeight": 34})
|
||||
assert-property: ("#main-content", {"offsetTop": 64})
|
||||
assert-position: ("nav.sub form", {"y": 15})
|
||||
assert-property: ("nav.sub form", {"offsetHeight": 34})
|
||||
assert-position: ("h1", {"y": 64})
|
||||
// 15 = 64 - 34 - 15
|
||||
|
||||
// Now do the same check on moderately-sized, tablet mobile.
|
||||
set-window-size: (700, 700)
|
||||
assert-css: ("nav.sub", {"flex-direction": "row"})
|
||||
assert-property: ("nav.sub form", {"offsetTop": 8, "offsetHeight": 34})
|
||||
assert-property: ("#main-content", {"offsetTop": 50})
|
||||
assert-position: ("nav.sub form", {"y": 8})
|
||||
assert-property: ("nav.sub form", {"offsetHeight": 34})
|
||||
assert-position: ("h1", {"y": 50})
|
||||
// 8 = 50 - 34 - 8
|
||||
|
||||
// Check the sidebar directory entries have a marker and spacing (tablet).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue