forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#110076 - Nilstrieb:rollup-22yp01c, r=Nilstrieb
Rollup of 5 pull requests Successful merges: - rust-lang#110030 (rustdoc: clean up JS) - rust-lang#110037 (rustdoc: add test and bug fix for theme defaults) - rust-lang#110065 (Fix wrong type in docs: i16 -> u16) - rust-lang#110068 (Temporarily remove myself from reviewers list) - rust-lang#110075 (Fix a typo in `config.example.toml`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
7 changed files
with
38 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Ensure that the theme picker always starts with the actual defaults. | ||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html" | ||
click: "#settings-menu" | ||
wait-for: "#theme-system-preference" | ||
assert: "#theme-system-preference:checked" | ||
assert: "#preferred-light-theme-light:checked" | ||
assert: "#preferred-dark-theme-dark:checked" | ||
assert-false: "#preferred-dark-theme-ayu:checked" | ||
|
||
// Test legacy migration from old theme setup without system-preference matching. | ||
// See https://github.com/rust-lang/rust/pull/77809#issuecomment-707875732 | ||
local-storage: { | ||
"rustdoc-preferred-light-theme": null, | ||
"rustdoc-preferred-dark-theme": null, | ||
"rustdoc-use-system-theme": null, | ||
"rustdoc-theme": "ayu" | ||
} | ||
goto: "file://" + |DOC_PATH| + "/test_docs/index.html" | ||
click: "#settings-menu" | ||
wait-for: "#theme-system-preference" | ||
assert: "#theme-system-preference:checked" | ||
assert: "#preferred-light-theme-light:checked" | ||
assert-false: "#preferred-dark-theme-dark:checked" | ||
assert: "#preferred-dark-theme-ayu:checked" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters