Skip to content

[beta] Fix CVE-2022-21658 #93111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 21, 2022
Prev Previous commit
Add GUI test for rust logo style in the sidebars
  • Loading branch information
GuillaumeGomez authored and Mark-Simulacrum committed Jan 20, 2022
commit 046f8b89cc1baa27b66ed107bebf09af1d6a99a5
78 changes: 78 additions & 0 deletions src/test/rustdoc-gui/rust-logo.goml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// This test ensures that the correct style is applied to the rust logo in the sidebar.
goto: file://|DOC_PATH|/test_docs/index.html

// First we start with the dark theme.
local-storage: {
"rustdoc-theme": "dark",
"rustdoc-preferred-dark-theme": "dark",
"rustdoc-use-system-theme": "false",
}
reload:

assert-css: (
".rust-logo",
{"filter": "drop-shadow(rgb(255, 255, 255) 1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px 1px 0px) drop-shadow(rgb(255, 255, 255) -1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px -1px 0px)"},
)

// In the source view page now.
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html

local-storage: {
"rustdoc-theme": "dark",
"rustdoc-preferred-dark-theme": "dark",
"rustdoc-use-system-theme": "false",
}
reload:

assert-css: (
".rust-logo",
{"filter": "drop-shadow(rgb(255, 255, 255) 1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px 1px 0px) drop-shadow(rgb(255, 255, 255) -1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px -1px 0px)"},
)

// Then with the ayu theme.
local-storage: {
"rustdoc-theme": "ayu",
"rustdoc-preferred-dark-theme": "ayu",
"rustdoc-use-system-theme": "false",
}
reload:

assert-css: (
".rust-logo",
{"filter": "drop-shadow(rgb(255, 255, 255) 1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px 1px 0px) drop-shadow(rgb(255, 255, 255) -1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px -1px 0px)"},
)

// In the source view page now.
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html

local-storage: {
"rustdoc-theme": "ayu",
"rustdoc-preferred-dark-theme": "ayu",
"rustdoc-use-system-theme": "false",
}
reload:

assert-css: (
".rust-logo",
{"filter": "drop-shadow(rgb(255, 255, 255) 1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px 1px 0px) drop-shadow(rgb(255, 255, 255) -1px 0px 0px) drop-shadow(rgb(255, 255, 255) 0px -1px 0px)"},
)

// And finally with the light theme.
local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
reload:

assert-css: (
".rust-logo",
{"filter": "none"},
)

// In the source view page now.
goto: file://|DOC_PATH|/src/test_docs/lib.rs.html

local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
reload:

assert-css: (
".rust-logo",
{"filter": "none"},
)