Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: LayoutTests/css3/calc/calc-with-time-angle-and-frequency-values.html

Issue 345903005: calc expressions should support time, angle and frequency values. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698