about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-08 21:43:25 +0000
committerbors <bors@rust-lang.org>2022-10-08 21:43:25 +0000
commitf382c2748aec2ada91eff88840c996644ff0f70d (patch)
tree85ae870f8b8a10329cece97bf46f5a6e2a4407f9 /src/test
parent8796e7a9cfd4c5c4f1de15ec1c53994ddf288665 (diff)
parent92628633ee821eba88b243dea46c0019c407c24a (diff)
downloadrust-f382c2748aec2ada91eff88840c996644ff0f70d.tar.gz
rust-f382c2748aec2ada91eff88840c996644ff0f70d.zip
Auto merge of #102819 - matthiaskrgr:rollup-xwnvofc, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #99194 (Fix gdb-cmd for rust-gdbgui)
 - #99880 (`EscapeAscii` is not an `ExactSizeIterator`)
 - #102524 (rustdoc: remove weird `<a href="#">` wrapper around unsafe triangle)
 - #102581 (Make the `config.src` handling for downloadable bootstrap more conservative)
 - #102604 (Improve readability of bootstrap's README)
 - #102723 (test: run-make: skip when cross-compiling)
 - #102815 (rustdoc: remove mobile topbar from source pages instead of hiding it)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-make/issue-36710/Makefile6
-rw-r--r--src/test/rustdoc-gui/sidebar-source-code.goml2
-rw-r--r--src/test/rustdoc-gui/src/test_docs/lib.rs4
-rw-r--r--src/test/rustdoc-gui/unsafe-fn.goml37
4 files changed, 43 insertions, 6 deletions
diff --git a/src/test/run-make/issue-36710/Makefile b/src/test/run-make/issue-36710/Makefile
index b5270ad2ba9..986a3f4e64b 100644
--- a/src/test/run-make/issue-36710/Makefile
+++ b/src/test/run-make/issue-36710/Makefile
@@ -1,10 +1,6 @@
-# ignore-riscv64 $(call RUN,foo) expects to run the target executable natively
+# ignore-cross-compile $(call RUN,foo) expects to run the target executable natively
 #                              so it won't work with remote-test-server
-# ignore-arm Another build using remote-test-server
 # ignore-none no-std is not supported
-# ignore-wasm32 FIXME: don't attempt to compile C++ to WASM
-# ignore-wasm64 FIXME: don't attempt to compile C++ to WASM
-# ignore-nvptx64-nvidia-cuda FIXME: can't find crate for `std`
 # ignore-musl FIXME: this makefile needs teaching how to use a musl toolchain
 #                    (see dist-i586-gnu-i586-i686-musl Dockerfile)
 
diff --git a/src/test/rustdoc-gui/sidebar-source-code.goml b/src/test/rustdoc-gui/sidebar-source-code.goml
index 4993384a27f..9ba66368772 100644
--- a/src/test/rustdoc-gui/sidebar-source-code.goml
+++ b/src/test/rustdoc-gui/sidebar-source-code.goml
@@ -42,4 +42,4 @@ assert-false: ".source-sidebar-expanded"
 assert: "nav.sidebar"
 
 // Check that the topbar is not visible
-assert-property: (".mobile-topbar", {"offsetParent": "null"})
+assert-false: ".mobile-topbar"
diff --git a/src/test/rustdoc-gui/src/test_docs/lib.rs b/src/test/rustdoc-gui/src/test_docs/lib.rs
index 0281973c1ba..33c74e3a331 100644
--- a/src/test/rustdoc-gui/src/test_docs/lib.rs
+++ b/src/test/rustdoc-gui/src/test_docs/lib.rs
@@ -367,3 +367,7 @@ impl TypeWithNoDocblocks {
     pub fn first_fn(&self) {}
     pub fn second_fn(&self) {}
 }
+
+pub unsafe fn unsafe_fn() {}
+
+pub fn safe_fn() {}
diff --git a/src/test/rustdoc-gui/unsafe-fn.goml b/src/test/rustdoc-gui/unsafe-fn.goml
new file mode 100644
index 00000000000..94f128db72e
--- /dev/null
+++ b/src/test/rustdoc-gui/unsafe-fn.goml
@@ -0,0 +1,37 @@
+goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
+
+compare-elements-property: (
+	"//a[@title='test_docs::safe_fn fn']/..",
+	"//a[@title='test_docs::unsafe_fn fn']/..",
+	["clientHeight"]
+)
+
+// If the text isn't displayed, the browser doesn't compute color style correctly...
+show-text: true
+
+// Set the theme to dark.
+local-storage: {"rustdoc-theme": "dark", "rustdoc-preferred-dark-theme": "dark", "rustdoc-use-system-theme": "false"}
+// We reload the page so the local storage settings are being used.
+reload:
+
+assert-css: (".item-left sup", {
+	"color": "rgb(221, 221, 221)"
+})
+
+// Set the theme to ayu.
+local-storage: {"rustdoc-theme": "ayu", "rustdoc-preferred-dark-theme": "ayu", "rustdoc-use-system-theme": "false"}
+// We reload the page so the local storage settings are being used.
+reload:
+
+assert-css: (".item-left sup", {
+	"color": "rgb(197, 197, 197)"
+})
+
+// Set the theme to light.
+local-storage: {"rustdoc-theme": "light", "rustdoc-preferred-dark-theme": "light", "rustdoc-use-system-theme": "false"}
+// We reload the page so the local storage settings are being used.
+reload:
+
+assert-css: (".item-left sup", {
+	"color": "rgb(0, 0, 0)"
+})