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

Side by Side Diff: LayoutTests/css3/calc/calc-errors.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
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <style> 2 <style>
3 #test div { 3 #test div {
4 height: 100px; 4 height: 100px;
5 background-color: red; 5 background-color: red;
6 } 6 }
7 </style> 7 </style>
8 8
9 <p> 9 <p>
10 All boxes below should be 100px * 100px and green. 10 All boxes below should be 100px * 100px and green.
11 </p> 11 </p>
12 12
13 <div id="test"> 13 <div id="test">
14 14
15 <!-- just plain bad --> 15 <!-- just plain bad -->
16 <div style="width: 100px; width: calc(;">unclosed calc</div> 16 <div style="width: 100px; width: calc(;">unclosed calc</div>
17 <div style="width: 100px; width: calc( flim;">unclosed calc with garbage</div> 17 <div style="width: 100px; width: calc( flim;">unclosed calc with garbage</div>
18 <div style="width: 100px; width: calc( flim );">garbage</div> 18 <div style="width: 100px; width: calc( flim );">garbage</div>
19 19
20 <!-- unsupported units -->
21 <div style="width: 100px; width: calc(10dpi);">dpi</div>
22 <div style="width: 100px; width: calc(10dpi / 4);">dpi / number</div>
23 <div style="width: 100px; width: calc(5dpi + 5dpi);">dpi + dpi</div>
alancutter (OOO until 2018) 2014/07/02 05:56:10 Shouldn't these remain? This patch does not add su
24
25 <!-- zero division --> 20 <!-- zero division -->
26 <div style="width: 100px; width: calc(1ex / 0);">zero division</div> 21 <div style="width: 100px; width: calc(1ex / 0);">zero division</div>
27 22
28 <!-- wrong combination --> 23 <!-- wrong combination -->
alancutter (OOO until 2018) 2014/07/02 05:56:10 There should be tests that check we don't accept m
29 <div style="width: 100px; width: calc(200);">non length</div> 24 <div style="width: 100px; width: calc(200);">non length</div>
30 <div style="width: 100px; width: calc(10 + 10px);">number + length</div> 25 <div style="width: 100px; width: calc(10 + 10px);">number + length</div>
31 <div style="width: 100px; width: calc(10px + 10);">length + number</div> 26 <div style="width: 100px; width: calc(10px + 10);">length + number</div>
32 <div style="width: 100px; width: calc(10% + 100);">percent + number</div> 27 <div style="width: 100px; width: calc(10% + 100);">percent + number</div>
33 <div style="width: 100px; width: calc(100 + 10%);">number + percent</div> 28 <div style="width: 100px; width: calc(100 + 10%);">number + percent</div>
34 29
35 <div style="width: 100px; width: calc(300px - 100);">length - number</div> 30 <div style="width: 100px; width: calc(300px - 100);">length - number</div>
36 <div style="width: 100px; width: calc(300 - 100px);">number - length</div> 31 <div style="width: 100px; width: calc(300 - 100px);">number - length</div>
37 <div style="width: 100px; width: calc(100% - 10);">percent - number</div> 32 <div style="width: 100px; width: calc(100% - 10);">percent - number</div>
38 <div style="width: 100px; width: calc(100 - 10%);">number - percent</div> 33 <div style="width: 100px; width: calc(100 - 10%);">number - percent</div>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 error.push("expected height of 100, but was " + width); 97 error.push("expected height of 100, but was " + width);
103 98
104 if (error == "") { 99 if (error == "") {
105 element.style.backgroundColor = "green"; 100 element.style.backgroundColor = "green";
106 element.innerHTML += " => PASS"; 101 element.innerHTML += " => PASS";
107 } else { 102 } else {
108 element.innerHTML += " => FAIL: " + error.join(", "); 103 element.innerHTML += " => FAIL: " + error.join(", ");
109 } 104 }
110 } 105 }
111 </script> 106 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698