gecko-dev/testing/web-platform/tests/css/css-backgrounds/parsing/box-shadow-computed.html
Eric Willigers 21ff51268a Bug 1564779 [wpt PR 17661] - CSS: WPT for box-shadow computed value, a=testonly
Automatic update from web-platform-tests
CSS: WPT for box-shadow computed value

Computed box-shadow shadow value has computed color, 4 lengths made
absolute, and an optional inset keyword.
https://drafts.csswg.org/css-backgrounds-3/#box-shadow

getComputedStyle result for caret-color is a color.
https://drafts.csswg.org/css-ui-3/#caret-color

getComputedStyle result for outline-color is a color, or invert.
https://drafts.csswg.org/css-ui-3/#outline-color

Change-Id: I4b1d18368447bc7c8846446581add843debdddab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1688752
Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#675217}

--

wpt-commits: 255b99e5c2e0f5f8010adf6b69e3c1e0b73f7652
wpt-pr: 17661
2019-07-24 13:33:13 +01:00

29 lines
964 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Backgrounds and Borders Module Level 3: getComputedStyle().boxShadow</title>
<link rel="help" href="https://drafts.csswg.org/css-backgrounds/#box-shadow">
<meta name="assert" content="box-shadow computes to none or a list.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<style>
#target {
color: blue;
font-size: 20px;
}
</style>
</head>
<body>
<div id="target"></div>
<script>
'use strict';
const currentColor = 'rgb(0, 0, 255)';
test_computed_value('box-shadow', 'none');
test_computed_value('box-shadow', '1px 2px', currentColor + ' 1px 2px 0px 0px');
test_computed_value('box-shadow', 'currentcolor -1em -2em 3em -4em', currentColor + ' -20px -40px 60px -80px');
test_computed_value('box-shadow', 'rgb(0, 255, 0) 1px 2px 3px 4px inset');
</script>
</body>
</html>