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

Side by Side Diff: LayoutTests/css3/calc/calc-errors.html

Issue 1239983004: Make CSSCalcValue work with CSSParserTokenRange (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comments and add subtests Created 5 years, 4 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
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <script src="../../resources/testharness.js"></script> 2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script> 3 <script src="../../resources/testharnessreport.js"></script>
4 <style> 4 <style>
5 div { 5 div {
6 height: 100px; 6 height: 100px;
7 width: 100px; 7 width: 100px;
8 transform: matrix(1, 0, 0, 1, 0, 0); 8 transform: matrix(1, 0, 0, 1, 0, 0);
9 animation-delay: 100s; 9 animation-delay: 100s;
10 } 10 }
(...skipping 18 matching lines...) Expand all
29 <div style="width: calc(1 mod10 * 200px);">mod10 </div> 29 <div style="width: calc(1 mod10 * 200px);">mod10 </div>
30 <div style="width: calc(1mod 10 * 200px);">1mod</div> 30 <div style="width: calc(1mod 10 * 200px);">1mod</div>
31 <div style="width: calc(70px+40px);">70px+40px no whitespace around + </div> 31 <div style="width: calc(70px+40px);">70px+40px no whitespace around + </div>
32 <div style="width: calc(70px +40px);">70px +40px no whitespace on right of +</di v> 32 <div style="width: calc(70px +40px);">70px +40px no whitespace on right of +</di v>
33 <div style="width: calc(70px+ 40px);">70px+ 40px no whitespace on left of +</div > 33 <div style="width: calc(70px+ 40px);">70px+ 40px no whitespace on left of +</div >
34 <div style="width: calc(70px+-40px);">70px+-40px no whitespace around + </div> 34 <div style="width: calc(70px+-40px);">70px+-40px no whitespace around + </div>
35 <div style="width: calc(70px-40px);">70px-40px no whitespace around - </div> 35 <div style="width: calc(70px-40px);">70px-40px no whitespace around - </div>
36 <div style="width: calc(70px -40px);">70px -40px no whitespace on right of -</di v> 36 <div style="width: calc(70px -40px);">70px -40px no whitespace on right of -</di v>
37 <div style="width: calc(70px- 40px);">70px- 40px no whitespace on left of -</div > 37 <div style="width: calc(70px- 40px);">70px- 40px no whitespace on left of -</div >
38 <div style="width: calc(70px-+40px);">70px-+40px no whitespace around - </div> 38 <div style="width: calc(70px-+40px);">70px-+40px no whitespace around - </div>
39 <div style="width: calc(1px +/**/2px);"></div>
40 <div style="width: calc(1px/**/+ 2px);"></div>
41 <div style="width: calc(1px -/**/2px);"></div>
42 <div style="width: calc(1px/**/- 2px);"></div>
39 43
40 <!-- too many nests should be rejected to avoid stack overflow --> 44 <!-- too many nests should be rejected to avoid stack overflow -->
41 <div style="width: calc((((((((((((((((((((((((((((((((((((((((((((((((((((((((( ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((200px))) )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) ))))))))))))))))))))))))))))))))))))))))))))));">too many nests</div> 45 <div style="width: calc((((((((((((((((((((((((((((((((((((((((((((((((((((((((( ((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((200px))) )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) ))))))))))))))))))))))))))))))))))))))))))))));">too many nests</div>
42 46
43 <!-- invalid formulas --> 47 <!-- invalid formulas -->
44 <div style="width: calc(200px*);">end with operator</div> 48 <div style="width: calc(200px*);">end with operator</div>
45 <div style="width: calc(+ +200px);">start with operator</div> 49 <div style="width: calc(+ +200px);">start with operator</div>
46 <div style="width: calc();">no expressions</div> 50 <div style="width: calc();">no expressions</div>
47 <div style="width: calc(100px + + +100px);">too many pluses</div> 51 <div style="width: calc(100px + + +100px);">too many pluses</div>
48 <div style="width: calc(200px 200px);">no binary operator</div> 52 <div style="width: calc(200px 200px);">no binary operator</div>
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 test(function() { 172 test(function() {
169 var divs = document.getElementsByTagName("div"); 173 var divs = document.getElementsByTagName("div");
170 for (var i = 0, element = divs[i]; i < divs.length; ++i) { 174 for (var i = 0, element = divs[i]; i < divs.length; ++i) {
171 assert_equals(getComputedStyle(element).getPropertyValue("width"), "100p x"); 175 assert_equals(getComputedStyle(element).getPropertyValue("width"), "100p x");
172 assert_equals(getComputedStyle(element).getPropertyValue("transform"), " matrix(1, 0, 0, 1, 0, 0)"); 176 assert_equals(getComputedStyle(element).getPropertyValue("transform"), " matrix(1, 0, 0, 1, 0, 0)");
173 assert_equals(getComputedStyle(element).getPropertyValue("animation-dela y"), "100s"); 177 assert_equals(getComputedStyle(element).getPropertyValue("animation-dela y"), "100s");
174 } 178 }
175 }, "Tests invalid calc() expression handling."); 179 }, "Tests invalid calc() expression handling.");
176 180
177 </script> 181 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/CSSCalculationValue.h » ('j') | Source/core/css/CSSCalculationValue.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698