gecko-dev/testing/web-platform/tests/css/css-backgrounds/parsing/background-position-invalid.html
Eric Willigers 2dd9c1848d Bug 1554471 [wpt PR 17015] - CSS: Test for background-* computed value, a=testonly
Automatic update from web-platform-tests
CSS: Test for background-* computed value

Add Web Platform Tests for computed values of background properties.
https://drafts.csswg.org/css-backgrounds-3/#property-index
https://drafts.csswg.org/css-backgrounds-4/#property-index

Includes tests with multiple background images:
The number of layers is determined by the number of comma-separated values in the background-image property.
https://drafts.csswg.org/css-backgrounds-3/#layering

Change-Id: I2081f1b558c6e8f4d508189a43c6c039593d382b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1630789
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#663503}

--

wp5At-commits: 859ac3eac9eec2770a2e9a244b2b812774a9cf8b
wpt-pr: 17015
2019-06-19 11:06:06 -07:00

28 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Backgrounds and Borders Module Level 3: parsing background-position with invalid values</title>
<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds/#background-position">
<meta name="assert" content="background-position supports only the grammar '<bg-position>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_invalid_value("background-position", "left right");
test_invalid_value("background-position", "top bottom");
test_invalid_value("background-position", "1% center 2px");
test_invalid_value("background-position", "right 7% 50%");
test_invalid_value("background-position", "50% top 8px");
test_invalid_value("background-position", "left 10px 50%");
test_invalid_value("background-position", "right 11% 100%");
test_invalid_value("background-position", "100% top 14%");
test_invalid_value("background-position", "50% top 15px");
test_invalid_value("background-position", "0% bottom 16%");
test_invalid_value("background-position", "right 19% 100%");
</script>
</body>
</html>