1 // The goal of this test is to ensure the color of the text is the one expected.
2 goto: file://|DOC_PATH|/test_docs/index.html?search=coo
4 // This is needed so that the text color is computed.
9 "rustdoc-theme": "ayu",
10 "rustdoc-preferred-dark-theme": "ayu",
11 "rustdoc-use-system-theme": "false",
15 // Waiting for the search results to appear...
18 "//*[@class='desc']//*[text()='Just a normal struct.']",
19 {"color": "rgb(197, 197, 197)"},
22 "//*[@class='result-name']/*[text()='test_docs::']",
23 {"color": "rgb(0, 150, 207)"},
26 // Checking the color for "keyword".
28 "//*[@class='result-name']//*[text()='(keyword)']",
29 {"color": "rgb(120, 135, 151)"},
34 "rustdoc-theme": "dark",
35 "rustdoc-preferred-dark-theme": "dark",
36 "rustdoc-use-system-theme": "false",
40 // Waiting for the search results to appear...
43 "//*[@class='desc']//*[text()='Just a normal struct.']",
44 {"color": "rgb(221, 221, 221)"},
47 "//*[@class='result-name']/*[text()='test_docs::']",
48 {"color": "rgb(221, 221, 221)"},
51 // Checking the color for "keyword".
53 "//*[@class='result-name']//*[text()='(keyword)']",
54 {"color": "rgb(221, 221, 221)"},
58 local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"}
61 // Waiting for the search results to appear...
64 "//*[@class='desc']//*[text()='Just a normal struct.']",
65 {"color": "rgb(0, 0, 0)"},
68 "//*[@class='result-name']/*[text()='test_docs::']",
69 {"color": "rgb(0, 0, 0)"},
72 // Checking the color for "keyword".
74 "//*[@class='result-name']//*[text()='(keyword)']",
75 {"color": "rgb(0, 0, 0)"},
78 // Check the alias more specifically in the dark theme.
79 goto: file://|DOC_PATH|/test_docs/index.html
80 // We set the theme so we're sure that the correct values will be used, whatever the computer
81 // this test is running on.
83 "rustdoc-theme": "dark",
84 "rustdoc-preferred-dark-theme": "dark",
85 "rustdoc-use-system-theme": "false",
87 // If the text isn't displayed, the browser doesn't compute color style correctly...
89 // We reload the page so the local storage settings are being used.
91 write: (".search-input", "thisisanalias")
92 // Waiting for the search results to appear...
94 // Checking that the colors for the alias element are the ones expected.
95 assert-css: (".result-name > .alias", {"color": "rgb(255, 255, 255)"})
96 assert-css: (".result-name > .alias > .grey", {"color": "rgb(204, 204, 204)"})