diff options
| author | bors <bors@rust-lang.org> | 2022-01-20 20:44:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-01-20 20:44:14 +0000 |
| commit | 777bb86bcdbc568be7cff6eeeaaf81a89b4aa50b (patch) | |
| tree | 82f458e6da62ec8cd4baa7cf5c1b4c2eed5f3cc5 /src/test/rustdoc-gui | |
| parent | 74fbbefea8d13683cca5eee62e4740706cb3144a (diff) | |
| parent | dbc97490bbca00e6913c34b8864791d660c60312 (diff) | |
| download | rust-777bb86bcdbc568be7cff6eeeaaf81a89b4aa50b.tar.gz rust-777bb86bcdbc568be7cff6eeeaaf81a89b4aa50b.zip | |
Auto merge of #93119 - matthiaskrgr:rollup-ku3cn5j, r=matthiaskrgr
Rollup of 13 pull requests Successful merges: - #89747 (Add MaybeUninit::(slice_)as_bytes(_mut)) - #89764 (Fix variant index / discriminant confusion in uninhabited enum branching) - #91606 (Stabilize `-Z print-link-args` as `--print link-args`) - #91694 (rustdoc: decouple stability and const-stability) - #92183 (Point at correct argument when async fn output type lifetime disagrees with signature) - #92582 (improve `_` constants in item signature handling) - #92680 (intra-doc: Use the impl's assoc item where possible) - #92704 (Change lint message to be stronger for &T -> &mut T transmute) - #92861 (Rustdoc mobile: put out-of-band info on its own line) - #92992 (Help optimize out backtraces when disabled) - #93038 (Fix star handling in block doc comments) - #93108 (:arrow_up: rust-analyzer) - #93112 (Fix CVE-2022-21658) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/rustdoc-gui')
| -rw-r--r-- | src/test/rustdoc-gui/mobile.goml | 17 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/toggle-docs-mobile.goml | 12 |
2 files changed, 23 insertions, 6 deletions
diff --git a/src/test/rustdoc-gui/mobile.goml b/src/test/rustdoc-gui/mobile.goml new file mode 100644 index 00000000000..acde1123925 --- /dev/null +++ b/src/test/rustdoc-gui/mobile.goml @@ -0,0 +1,17 @@ +// Test various properties of the mobile UI +goto: file://|DOC_PATH|/staged_api/struct.Foo.html +size: (400, 600) + +// The out-of-band info (source, stable version, collapse) should be below the +// h1 when the screen gets narrow enough. +assert-css: (".main-heading", { + "display": "flex", + "flex-direction": "column" +}) + +// Note: We can't use assert-text here because the 'Since' is set by CSS and +// is therefore not part of the DOM. +assert-css: (".content .out-of-band .since::before", { "content": "\"Since \"" }) + +size: (1000, 1000) +assert-css-false: (".content .out-of-band .since::before", { "content": "\"Since \"" }) diff --git a/src/test/rustdoc-gui/toggle-docs-mobile.goml b/src/test/rustdoc-gui/toggle-docs-mobile.goml index 4c83fd6c0e3..e7a75b43c5a 100644 --- a/src/test/rustdoc-gui/toggle-docs-mobile.goml +++ b/src/test/rustdoc-gui/toggle-docs-mobile.goml @@ -1,12 +1,12 @@ goto: file://|DOC_PATH|/test_docs/struct.Foo.html size: (433, 600) assert-attribute: (".top-doc", {"open": ""}) -click: (4, 250) // This is the position of the top doc comment toggle +click: (4, 270) // This is the position of the top doc comment toggle assert-attribute-false: (".top-doc", {"open": ""}) -click: (4, 250) +click: (4, 270) assert-attribute: (".top-doc", {"open": ""}) // To ensure that the toggle isn't over the text, we check that the toggle isn't clicked. -click: (3, 250) +click: (3, 270) assert-attribute: (".top-doc", {"open": ""}) // Assert the position of the toggle on the top doc block. @@ -22,10 +22,10 @@ assert-position: ( // Now we do the same but with a little bigger width size: (600, 600) assert-attribute: (".top-doc", {"open": ""}) -click: (4, 250) // New Y position since all search elements are back on one line. +click: (4, 270) // New Y position since all search elements are back on one line. assert-attribute-false: (".top-doc", {"open": ""}) -click: (4, 250) +click: (4, 270) assert-attribute: (".top-doc", {"open": ""}) // To ensure that the toggle isn't over the text, we check that the toggle isn't clicked. -click: (3, 250) +click: (3, 270) assert-attribute: (".top-doc", {"open": ""}) |
