Skip to content

Commit

Permalink
[wpt] Don't make unimplemented CSS properties PASS.
Browse files Browse the repository at this point in the history
For computed style and inheritance tests, we silently passed
unimplemented CSS properties. Assert that they exist, and if not, fail
instead.

R=ericwilligers@chromium.org

Change-Id: I1f62bb2ef93b84528373b329dadefb6162ce19c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1609850
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660172}
  • Loading branch information
Rune Lillesveen authored and chromium-wpt-export-bot committed May 15, 2019
1 parent 7ffd31b commit e8b0b32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions css/support/computed-testcommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ function test_computed_value(property, specified, computed) {
computed = specified;
test(() => {
const target = document.getElementById('target');
if (!getComputedStyle(target)[property])
return;
assert_own_property(getComputedStyle(target), property);
target.style[property] = '';
target.style[property] = specified;
assert_equals(getComputedStyle(target)[property], computed);
Expand Down
9 changes: 3 additions & 6 deletions css/support/inheritance-testcommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
function assert_initial(property, initial) {
test(() => {
const target = document.getElementById('target');
if (!getComputedStyle(target)[property])
return;
assert_own_property(getComputedStyle(target), property);
target.style[property] = 'initial';
assert_equals(getComputedStyle(target)[property], initial);
target.style[property] = '';
Expand All @@ -29,8 +28,7 @@ function assert_inherited(property, initial, other) {
test(() => {
const container = document.getElementById('container');
const target = document.getElementById('target');
if (!getComputedStyle(target)[property])
return;
assert_own_property(getComputedStyle(target), property);
container.style[property] = 'initial';
target.style[property] = 'unset';
assert_not_equals(getComputedStyle(container)[property], other);
Expand Down Expand Up @@ -65,8 +63,7 @@ function assert_not_inherited(property, initial, other) {
test(() => {
const container = document.getElementById('container');
const target = document.getElementById('target');
if (!getComputedStyle(target)[property])
return;
assert_own_property(getComputedStyle(target), property);
container.style[property] = 'initial';
target.style[property] = 'unset';
assert_not_equals(getComputedStyle(container)[property], other);
Expand Down

0 comments on commit e8b0b32

Please sign in to comment.