Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <script src="../../resources/testharness.js"></script> | |
| 3 <script src="../../resources/testharnessreport.js"></script> | |
| 4 <script> | |
| 5 'use strict'; | |
| 6 | |
| 7 test(() => { | |
| 8 let ThreeValuedPositionBackgroundPosition = 1983; // From UseCounter.h | |
|
Bugs Nash
2017/05/22 23:07:08
as above
| |
| 9 | |
| 10 let isCounted = () => internals.isUseCounted(document, ThreeValuedPositionBa ckgroundPosition); | |
| 11 var div = document.createElement('div'); | |
| 12 | |
| 13 // These properties have their own counters. | |
| 14 div.style = 'shape-outside: circle(0px at left 10% top);'; | |
| 15 div.style = 'background-image: radial-gradient(0em circle at left 10% top, y ellow, blue);'; | |
| 16 div.style = 'object-position: left 10% top;'; | |
| 17 div.style = 'perspective-origin: left 10% top;'; | |
| 18 // These values are invalid. | |
| 19 div.style = 'offset-anchor: left 10% top;'; | |
| 20 div.style = 'offset-position: left 10% top;'; | |
| 21 div.style = 'transform-origin: left 10% top;'; | |
| 22 // These obsolete properties will never ship. | |
| 23 div.style = 'scroll-snap-coordinate: left 10% top;'; | |
| 24 div.style = 'scroll-snap-destination: left 10% top;'; | |
| 25 assert_false(isCounted(), | |
| 26 'non background-position should not be counted'); | |
| 27 | |
| 28 div.style = 'background-position: left;'; | |
| 29 div.style = 'background-position: left 10%;'; | |
| 30 div.style = 'background-position: left 10% top 20%;'; | |
| 31 assert_false(isCounted(), | |
| 32 '1,2,4 values should not be counted'); | |
| 33 | |
| 34 div.style = 'background-position: left 10% top;'; | |
| 35 assert_true(isCounted(), | |
| 36 'background-position should be counted'); | |
| 37 }, 'Three valued position syntax is use counted for background-position'); | |
| 38 </script> | |
| OLD | NEW |