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

Unified 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, 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/css3/calc/calc-with-time-angle-and-frequency-values.html
diff --git a/LayoutTests/css3/calc/calc-with-time-angle-and-frequency-values.html b/LayoutTests/css3/calc/calc-with-time-angle-and-frequency-values.html
new file mode 100644
index 0000000000000000000000000000000000000000..df1933491204729c2033fffb6d4a2d9492300a4e
--- /dev/null
+++ b/LayoutTests/css3/calc/calc-with-time-angle-and-frequency-values.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<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-
+<script>
+function getCSSProperty(elementId, styleAttribute)
+{
+ var div = document.getElementById(elementId);
+ return window.getComputedStyle(div, null).getPropertyValue(styleAttribute);
+}
+
+onload = function()
+{
+ description('Tests that calc() can contain angle, time and frequency values.');
+ shouldBeEqualToString("getCSSProperty('div1', '-webkit-transition-delay')", "2s");
+ shouldBeEqualToString("getCSSProperty('div2', '-webkit-transition-delay')", "3s");
+ shouldBeEqualToString("getCSSProperty('div3', 'transform')", getCSSProperty('div4', 'transform'));
+ shouldBeEqualToString("getCSSProperty('div5', 'transform')", getCSSProperty('div5', 'transform'));
+ debug("NOTE: since there is no CSS property that uses frequency at the moment we only test the parsing.");
+ shouldBe("getCSSProperty('div7', 'pitch')", "null");
+ shouldBe("getCSSProperty('div8', 'pitch')", "null");
+}
+</script>
alancutter (OOO until 2018) 2014/07/02 05:56:10 Our LayoutTests typically put DOM before script so
+</head>
+<body>
+ <div id="div1" style="-webkit-transition-delay:calc(1s + 1s);"></div>
+ <div id="div2" style="-webkit-transition-delay:calc(3 * 1s);"></div>
+ <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
+ <div id="div4" style="transform:rotate(90deg);"></div>
+ <div id="div5" style="transform:rotate(calc(50grad * 2));"></div>
+ <div id="div6" style="transform:rotate(100grad);"></div>
+ <div id="div7" style="pitch:(12Hz / 1);"></div>
+ <div id="div8" style="pitch:(12Hz + 3Hz);"></div>
alancutter (OOO until 2018) 2014/07/02 05:56:10 Should these have calc() around them?
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698