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

Side by Side Diff: third_party/WebKit/LayoutTests/custom-properties/register-property-syntax-parsing.html

Issue 2354463002: CSS Properties and Values API: Implement computation / computational independence (Closed)
Patch Set: actually fix test :) Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/custom-properties/register-property-syntax-parsing-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <script> 4 <script>
5 function assert_valid(syntax, initialValue) { 5 function assert_valid(syntax, initialValue) {
6 // No actual assertions, this just shouldn't throw 6 // No actual assertions, this just shouldn't throw
7 test(function() { 7 test(function() {
8 try { CSS.unregisterProperty('--syntax-test'); } catch(e) { } 8 try { CSS.unregisterProperty('--syntax-test'); } catch(e) { }
9 CSS.registerProperty({name: '--syntax-test', syntax: syntax, initialValu e: initialValue}); 9 CSS.registerProperty({name: '--syntax-test', syntax: syntax, initialValu e: initialValue});
10 }, "syntax:'" + syntax + "', initialValue:'" + initialValue + "' is valid"); 10 }, "syntax:'" + syntax + "', initialValue:'" + initialValue + "' is valid");
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 assert_invalid("banana", "bAnAnA"); 125 assert_invalid("banana", "bAnAnA");
126 assert_invalid("<length>", "var(--moo)"); 126 assert_invalid("<length>", "var(--moo)");
127 assert_invalid("<length>", "10"); 127 assert_invalid("<length>", "10");
128 assert_invalid("<length>", "10%"); 128 assert_invalid("<length>", "10%");
129 assert_invalid("<length>", "calc(5px + 10%)"); 129 assert_invalid("<length>", "calc(5px + 10%)");
130 assert_invalid("<length>", "calc(5px * 3px / 6px)"); 130 assert_invalid("<length>", "calc(5px * 3px / 6px)");
131 assert_invalid("<length>", "10em"); 131 assert_invalid("<length>", "10em");
132 assert_invalid("<length>", "10vmin"); 132 assert_invalid("<length>", "10vmin");
133 assert_invalid("<length>", "calc(4px + 3em)"); 133 assert_invalid("<length>", "calc(4px + 3em)");
134 assert_invalid("<length>", "calc(4px + calc(8 * 2em))"); 134 assert_invalid("<length>", "calc(4px + calc(8 * 2em))");
135 assert_invalid("<length>+", "calc(2ex + 16px)");
136 assert_invalid("<length>+", "10px calc(20px + 4rem)");
137 assert_invalid("<percentage> | <length>+", "calc(100vh - 10px) 30px");
135 assert_invalid("<length>", "10px;"); 138 assert_invalid("<length>", "10px;");
136 assert_invalid("<length-percentage>", "calc(2px + 10% + 7ex)"); 139 assert_invalid("<length-percentage>", "calc(2px + 10% + 7ex)");
137 assert_invalid("<percentage>", "0"); 140 assert_invalid("<percentage>", "0");
138 assert_invalid("<integer>", "1.0"); 141 assert_invalid("<integer>", "1.0");
139 assert_invalid("<integer>", "1e0"); 142 assert_invalid("<integer>", "1e0");
140 assert_invalid("<number>|foo", "foo var(--foo, bla)"); 143 assert_invalid("<number>|foo", "foo var(--foo, bla)");
141 144
142 assert_invalid("<angle>", "10%"); 145 assert_invalid("<angle>", "10%");
143 assert_invalid("<time>", "2px"); 146 assert_invalid("<time>", "2px");
144 assert_invalid("<resolution>", "10"); 147 assert_invalid("<resolution>", "10");
145 assert_invalid("<transform-function>", "scale()"); 148 assert_invalid("<transform-function>", "scale()");
146 assert_invalid("<color>", "fancy-looking"); 149 assert_invalid("<color>", "fancy-looking");
147 assert_invalid("<image>", "banana.png"); 150 assert_invalid("<image>", "banana.png");
148 assert_invalid("<url>", "banana.png"); 151 assert_invalid("<url>", "banana.png");
149 </script> 152 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/custom-properties/register-property-syntax-parsing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698