Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../resources/js-test.js"></script> | |
|
alancutter (OOO until 2018)
2014/07/02 05:56:10
New tests should use testharness.js instead of js-
| |
| 5 <script> | |
| 6 function getCSSProperty(elementId, styleAttribute) | |
| 7 { | |
| 8 var div = document.getElementById(elementId); | |
| 9 return window.getComputedStyle(div, null).getPropertyValue(styleAttribut e); | |
| 10 } | |
| 11 | |
| 12 onload = function() | |
| 13 { | |
| 14 description('Tests that calc() can contain angle, time and frequency val ues.'); | |
| 15 shouldBeEqualToString("getCSSProperty('div1', '-webkit-transition-delay' )", "2s"); | |
| 16 shouldBeEqualToString("getCSSProperty('div2', '-webkit-transition-delay' )", "3s"); | |
| 17 shouldBeEqualToString("getCSSProperty('div3', 'transform')", getCSSPrope rty('div4', 'transform')); | |
| 18 shouldBeEqualToString("getCSSProperty('div5', 'transform')", getCSSPrope rty('div5', 'transform')); | |
| 19 debug("NOTE: since there is no CSS property that uses frequency at the m oment we only test the parsing."); | |
| 20 shouldBe("getCSSProperty('div7', 'pitch')", "null"); | |
| 21 shouldBe("getCSSProperty('div8', 'pitch')", "null"); | |
| 22 } | |
| 23 </script> | |
|
alancutter (OOO until 2018)
2014/07/02 05:56:10
Our LayoutTests typically put DOM before script so
| |
| 24 </head> | |
| 25 <body> | |
| 26 <div id="div1" style="-webkit-transition-delay:calc(1s + 1s);"></div> | |
| 27 <div id="div2" style="-webkit-transition-delay:calc(3 * 1s);"></div> | |
| 28 <div id="div3" style="transform:rotate(calc(45deg + 45deg));"></div> | |
|
alancutter (OOO until 2018)
2014/07/02 05:56:10
We should be testing combinations of different uni
| |
| 29 <div id="div4" style="transform:rotate(90deg);"></div> | |
| 30 <div id="div5" style="transform:rotate(calc(50grad * 2));"></div> | |
| 31 <div id="div6" style="transform:rotate(100grad);"></div> | |
| 32 <div id="div7" style="pitch:(12Hz / 1);"></div> | |
| 33 <div id="div8" style="pitch:(12Hz + 3Hz);"></div> | |
|
alancutter (OOO until 2018)
2014/07/02 05:56:10
Should these have calc() around them?
| |
| 34 </body> | |
| 35 </html> | |
| OLD | NEW |