|
| 1 | +// This test ensures that the correct style is applied to the rust logo in the sidebar. |
| 2 | +goto: file://|DOC_PATH|/test_docs/index.html |
| 3 | + |
| 4 | +// First we start with the dark theme. |
| 5 | +local-storage: { |
| 6 | + "rustdoc-theme": "dark", |
| 7 | + "rustdoc-preferred-dark-theme": "dark", |
| 8 | + "rustdoc-use-system-theme": "false", |
| 9 | +} |
| 10 | +reload: |
| 11 | + |
| 12 | +assert-css: ( |
| 13 | + ".rust-logo", |
| 14 | + {"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)"}, |
| 15 | +) |
| 16 | + |
| 17 | +// In the source view page now. |
| 18 | +goto: file://|DOC_PATH|/src/test_docs/lib.rs.html |
| 19 | + |
| 20 | +local-storage: { |
| 21 | + "rustdoc-theme": "dark", |
| 22 | + "rustdoc-preferred-dark-theme": "dark", |
| 23 | + "rustdoc-use-system-theme": "false", |
| 24 | +} |
| 25 | +reload: |
| 26 | + |
| 27 | +assert-css: ( |
| 28 | + ".rust-logo", |
| 29 | + {"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)"}, |
| 30 | +) |
| 31 | + |
| 32 | +// Then with the ayu theme. |
| 33 | +local-storage: { |
| 34 | + "rustdoc-theme": "ayu", |
| 35 | + "rustdoc-preferred-dark-theme": "ayu", |
| 36 | + "rustdoc-use-system-theme": "false", |
| 37 | +} |
| 38 | +reload: |
| 39 | + |
| 40 | +assert-css: ( |
| 41 | + ".rust-logo", |
| 42 | + {"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)"}, |
| 43 | +) |
| 44 | + |
| 45 | +// In the source view page now. |
| 46 | +goto: file://|DOC_PATH|/src/test_docs/lib.rs.html |
| 47 | + |
| 48 | +local-storage: { |
| 49 | + "rustdoc-theme": "ayu", |
| 50 | + "rustdoc-preferred-dark-theme": "ayu", |
| 51 | + "rustdoc-use-system-theme": "false", |
| 52 | +} |
| 53 | +reload: |
| 54 | + |
| 55 | +assert-css: ( |
| 56 | + ".rust-logo", |
| 57 | + {"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)"}, |
| 58 | +) |
| 59 | + |
| 60 | +// And finally with the light theme. |
| 61 | +local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"} |
| 62 | +reload: |
| 63 | + |
| 64 | +assert-css: ( |
| 65 | + ".rust-logo", |
| 66 | + {"filter": "none"}, |
| 67 | +) |
| 68 | + |
| 69 | +// In the source view page now. |
| 70 | +goto: file://|DOC_PATH|/src/test_docs/lib.rs.html |
| 71 | + |
| 72 | +local-storage: {"rustdoc-theme": "light", "rustdoc-use-system-theme": "false"} |
| 73 | +reload: |
| 74 | + |
| 75 | +assert-css: ( |
| 76 | + ".rust-logo", |
| 77 | + {"filter": "none"}, |
| 78 | +) |
0 commit comments