Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-ui] expect resolved color in inheritance test #13748

Merged
merged 2 commits into from
Jan 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions css/css-ui/inheritance.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,32 @@
#reference {
border-style: dotted; /* Avoid border-top-width computed style 0 */
border-top-width: medium;
color: lime;
background: blue;
}

#container, #target {
outline-style: dotted; /* Avoid outline-width computed style 0 */
color: lime;
background: blue;
}
</style>
<script>
const mediumWidth = getComputedStyle(reference).borderTopWidth; // e.g. 3px
const currentColor = getComputedStyle(reference).color;

assert_not_inherited('appearance', 'auto', 'none');
assert_inherited('caret-color', 'auto', 'rgba(42, 53, 64, 0.75)');
assert_inherited('caret-color', currentColor, 'rgba(42, 53, 64, 0.75)');
assert_inherited('caret-shape', 'auto', 'bar');
assert_inherited('cursor', 'auto', 'pointer');
assert_not_inherited('nav-down', 'auto', '#foo');
assert_not_inherited('nav-left', 'auto', '#foo');
assert_not_inherited('nav-right', 'auto', '#foo');
assert_not_inherited('nav-up', 'auto', '#foo');
assert_not_inherited('outline-color', 'invert', 'rgba(42, 53, 64, 0.75)');
if (CSS.supports('outline-color', 'invert'))
assert_not_inherited('outline-color', 'invert', 'rgba(42, 53, 64, 0.75)');
else
assert_not_inherited('outline-color', currentColor, 'rgba(42, 53, 64, 0.75)');
assert_not_inherited('outline-offset', '0px', '10px');
assert_not_inherited('outline-style', 'none', 'auto');
assert_not_inherited('outline-width', mediumWidth, '10px');
Expand Down