2022-09-24 09:31:34 -05:00
|
|
|
// This test checks links colors in sidebar before and after hover.
|
2022-10-07 13:17:05 -05:00
|
|
|
goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
|
2022-09-24 09:31:34 -05:00
|
|
|
|
|
|
|
// This is needed so that the text color is computed.
|
|
|
|
show-text: true
|
|
|
|
|
|
|
|
// Ayu theme
|
|
|
|
local-storage: {
|
|
|
|
"rustdoc-theme": "ayu",
|
|
|
|
"rustdoc-use-system-theme": "false",
|
|
|
|
}
|
|
|
|
reload:
|
|
|
|
|
|
|
|
// Struct
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.struct a:not(.current)",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.struct a:not(.current)"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.struct a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
|
|
|
// Enum
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.enum a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.enum a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.enum a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
|
|
|
// Union
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.union a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.union a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.union a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
|
|
|
// Trait
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.trait a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.trait a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.trait a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
|
|
|
// Function
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.fn a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.fn a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.fn a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
|
|
|
// Type definition
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.type a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.type a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.type a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
|
|
|
// Keyword
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.keyword a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.keyword a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.keyword a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
|
|
|
|
|
|
|
// Dark theme
|
|
|
|
local-storage: {"rustdoc-theme": "dark"}
|
|
|
|
reload:
|
|
|
|
|
|
|
|
// Struct
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.struct a:not(.current)",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.struct a:not(.current)"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.struct a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
|
|
|
|
)
|
|
|
|
// Enum
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.enum a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.enum a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.enum a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
|
|
|
|
)
|
|
|
|
// Union
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.union a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.union a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.union a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
|
|
|
|
)
|
|
|
|
// Trait
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.trait a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.trait a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.trait a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
|
|
|
|
)
|
|
|
|
// Function
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.fn a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.fn a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.fn a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
|
|
|
|
)
|
|
|
|
// Type definition
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.type a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.type a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.type a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
|
|
|
|
)
|
|
|
|
// Keyword
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.keyword a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.keyword a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.keyword a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
|
|
|
|
)
|
|
|
|
|
|
|
|
// Light theme
|
|
|
|
local-storage: {"rustdoc-theme": "light"}
|
|
|
|
reload:
|
|
|
|
|
|
|
|
// Struct
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.struct a:not(.current)",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.struct a:not(.current)"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.struct a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
|
|
|
|
)
|
|
|
|
// Enum
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.enum a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.enum a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.enum a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
|
|
|
|
)
|
|
|
|
// Union
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.union a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.union a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.union a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
|
|
|
|
)
|
|
|
|
// Trait
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.trait a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.trait a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.trait a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
|
|
|
|
)
|
|
|
|
// Function
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.fn a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.fn a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.fn a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
|
|
|
|
)
|
|
|
|
// Type definition
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.type a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.type a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.type a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
|
|
|
|
)
|
|
|
|
// Keyword
|
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.keyword a",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
|
|
|
|
)
|
2022-10-11 10:50:41 -05:00
|
|
|
move-cursor-to: ".sidebar .block.keyword a"
|
2022-09-24 09:31:34 -05:00
|
|
|
assert-css: (
|
2022-10-11 10:50:41 -05:00
|
|
|
".sidebar .block.keyword a:hover",
|
2022-09-24 09:31:34 -05:00
|
|
|
{"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
|
|
|
|
)
|