diff options
| author | bors <bors@rust-lang.org> | 2022-01-06 15:30:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-01-06 15:30:46 +0000 |
| commit | cfa4ac66c194046f631ce076c75516ecfdeb77ee (patch) | |
| tree | 10ace45fd5a86349c627f743747c097c5cdb7256 /src/test/rustdoc-gui | |
| parent | a77cc64af491a31db224109a76b9b81cd26cd07c (diff) | |
| parent | 26a90e4cd780175dd2d9dbf061eccd53eb9a2489 (diff) | |
| download | rust-cfa4ac66c194046f631ce076c75516ecfdeb77ee.tar.gz rust-cfa4ac66c194046f631ce076c75516ecfdeb77ee.zip | |
Auto merge of #92609 - matthiaskrgr:rollup-ldp47ot, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #92058 (Make Run button visible on hover) - #92288 (Fix a pair of mistyped test cases in `std::net::ip`) - #92349 (Fix rustdoc::private_doc_tests lint for public re-exported items) - #92360 (Some cleanups around check_argument_types) - #92389 (Regression test for borrowck ICE #92015) - #92404 (Fix font size for [src] links in headers) - #92443 (Rustdoc: resolve associated traits for non-generic primitive types) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/rustdoc-gui')
| -rw-r--r-- | src/test/rustdoc-gui/run-on-hover.goml | 7 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/src-font-size.goml | 12 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/src/test_docs/lib.rs | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/run-on-hover.goml b/src/test/rustdoc-gui/run-on-hover.goml new file mode 100644 index 00000000000..b8efa8e302f --- /dev/null +++ b/src/test/rustdoc-gui/run-on-hover.goml @@ -0,0 +1,7 @@ +// Example code blocks sometimes have a "Run" button to run them on the +// Playground. That button is hidden until the user hovers over the code block. +// This test checks that it is hidden, and that it shows on hover. +goto: file://|DOC_PATH|/test_docs/fn.foo.html +assert-css: (".test-arrow", {"visibility": "hidden"}) +move-cursor-to: ".example-wrap" +assert-css: (".test-arrow", {"visibility": "visible"}) diff --git a/src/test/rustdoc-gui/src-font-size.goml b/src/test/rustdoc-gui/src-font-size.goml new file mode 100644 index 00000000000..b0b2f122afd --- /dev/null +++ b/src/test/rustdoc-gui/src-font-size.goml @@ -0,0 +1,12 @@ +// This test ensures that the "[src]" have the same font size as their headers +// to avoid having some weird height difference in the background when the element +// is selected. +goto: file://|DOC_PATH|/test_docs/struct.Foo.html +show-text: true +// Check the impl headers. +assert-css: (".impl.has-srclink .srclink", {"font-size": "17px"}, ALL) +// The ".6" part is because the font-size is actually "1.1em". +assert-css: (".impl.has-srclink .code-header.in-band", {"font-size": "17.6px"}, ALL) +// Check the impl items. +assert-css: (".impl-items .has-srclink .srclink", {"font-size": "16px"}, ALL) +assert-css: (".impl-items .has-srclink .code-header", {"font-size": "16px"}, ALL) diff --git a/src/test/rustdoc-gui/src/test_docs/lib.rs b/src/test/rustdoc-gui/src/test_docs/lib.rs index 9b37703dded..f75de949292 100644 --- a/src/test/rustdoc-gui/src/test_docs/lib.rs +++ b/src/test/rustdoc-gui/src/test_docs/lib.rs @@ -1,5 +1,6 @@ //! The point of this crate is to be able to have enough different "kinds" of //! documentation generated so we can test each different features. +#![doc(html_playground_url="https://play.rust-lang.org/")] #![crate_name = "test_docs"] #![feature(rustdoc_internals)] |
