| <!DOCTYPE html> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| <script> |
| 'use strict'; |
| |
| test(() => { |
| let ThreeValuedPositionGradient = 2003; // From UseCounter.h |
| |
| let isCounted = () => internals.isUseCounted(document, ThreeValuedPositionGradient); |
| var div = document.createElement('div'); |
| |
| // usecounter-position3value-radial-gradient.html |
| // tests that other position-using properties do not |
| // increment the counter. |
| |
| div.style = 'background-image: conic-gradient(at left, black, red);'; |
| div.style = 'background-image: conic-gradient(at left 10%, black, red);'; |
| div.style = 'background-image: conic-gradient(at left 10% top 20%, black, red);'; |
| assert_false(isCounted(), |
| '1,2,4 values should not be counted'); |
| |
| div.style = 'background-image: conic-gradient(at left 10% top, black, red);'; |
| assert_true(isCounted(), |
| 'gradient should be counted'); |
| }, 'Three valued position syntax is use counted for conic-gradient'); |
| </script> |