blob: 973734f6148d57c24f37afc1738aeff952d5c236 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
'use strict';
test(() => {
let ThreeValuedPositionBasicShape = 2002; // From UseCounter.h
let isCounted = () => internals.isUseCounted(document, ThreeValuedPositionBasicShape);
var div = document.createElement('div');
// These properties have their own counters.
div.style = 'background-position: left 10% top;';
div.style = 'background-image: radial-gradient(0em circle at left 10% top, yellow, blue);';
div.style = 'object-position: left 10% top;';
div.style = 'perspective-origin: left 10% top;';
// These values are invalid.
div.style = 'offset-anchor: left 10% top;';
div.style = 'offset-position: left 10% top;';
div.style = 'transform-origin: left 10% top;';
// These obsolete properties will never ship.
div.style = 'scroll-snap-coordinate: left 10% top;';
div.style = 'scroll-snap-destination: left 10% top;';
assert_false(isCounted(),
'non basic-shape should not be counted');
div.style = 'shape-outside: circle(0px at left);';
div.style = 'shape-outside: circle(0px at left 10%);';
div.style = 'shape-outside: circle(0px at left 10% top 20%);';
assert_false(isCounted(),
'1,2,4 values should not be counted');
div.style = 'shape-outside: circle(0px at left 10% top);';
assert_true(isCounted(),
'basic-shape should be counted');
}, 'Three valued position syntax is use counted for circle');
</script>