diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-07-12 17:42:59 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2021-07-13 10:18:24 +0200 |
| commit | b8264a862f045de899d79e149d7ba4bd15adb6a3 (patch) | |
| tree | e386410a31ce7315968b8c7b1e82b389459185f1 | |
| parent | 168b4d490bd15c5eb0055cd748e7fbb4a5851456 (diff) | |
| download | rust-b8264a862f045de899d79e149d7ba4bd15adb6a3.tar.gz rust-b8264a862f045de899d79e149d7ba4bd15adb6a3.zip | |
Add test for keyword/primitive text color
| -rw-r--r-- | src/test/rustdoc-gui/search-result-color.goml | 9 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/src/test_docs/lib.rs | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/search-result-color.goml b/src/test/rustdoc-gui/search-result-color.goml index c138cc8d9c6..bb8ecb98fa3 100644 --- a/src/test/rustdoc-gui/search-result-color.goml +++ b/src/test/rustdoc-gui/search-result-color.goml @@ -13,6 +13,9 @@ wait-for: "#titles" assert-css: ("//*[@class='desc']//*[text()='Just a normal struct.']", {"color": "rgb(197, 197, 197)"}) assert-css: ("//*[@class='result-name']/*[text()='test_docs::']", {"color": "rgb(0, 150, 207)"}) +// Checking the color for "keyword". +assert-css: ("//*[@class='result-name']//*[text()='(keyword)']", {"color": "rgb(120, 135, 151)"}) + // Dark theme local-storage: {"rustdoc-theme": "dark", "rustdoc-preferred-dark-theme": "dark", "rustdoc-use-system-theme": "false"} reload: @@ -22,6 +25,9 @@ wait-for: "#titles" assert-css: ("//*[@class='desc']//*[text()='Just a normal struct.']", {"color": "rgb(221, 221, 221)"}) assert-css: ("//*[@class='result-name']/*[text()='test_docs::']", {"color": "rgb(221, 221, 221)"}) +// Checking the color for "keyword". +assert-css: ("//*[@class='result-name']//*[text()='(keyword)']", {"color": "rgb(221, 221, 221)"}) + // Light theme local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"} reload: @@ -30,3 +36,6 @@ reload: wait-for: "#titles" assert-css: ("//*[@class='desc']//*[text()='Just a normal struct.']", {"color": "rgb(0, 0, 0)"}) assert-css: ("//*[@class='result-name']/*[text()='test_docs::']", {"color": "rgb(0, 0, 0)"}) + +// Checking the color for "keyword". +assert-css: ("//*[@class='result-name']//*[text()='(keyword)']", {"color": "rgb(0, 0, 0)"}) diff --git a/src/test/rustdoc-gui/src/test_docs/lib.rs b/src/test/rustdoc-gui/src/test_docs/lib.rs index 3e753cb4de8..1b9f652120e 100644 --- a/src/test/rustdoc-gui/src/test_docs/lib.rs +++ b/src/test/rustdoc-gui/src/test_docs/lib.rs @@ -101,6 +101,7 @@ pub enum AnEnum { } #[doc(keyword = "CookieMonster")] +/// Some keyword. pub mod keyword {} /// Just some type alias. |
