| OLD | NEW |
| 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 test_count = 0; | 5 test_count = 0; |
| 6 | 6 |
| 7 function assert_valid(syntax, initialValue) { | 7 function assert_valid(syntax, initialValue) { |
| 8 // No actual assertions, this just shouldn't throw | 8 // No actual assertions, this just shouldn't throw |
| 9 test(function() { | 9 test(function() { |
| 10 var name = '--syntax-test-' + (test_count++); | 10 var name = '--syntax-test-' + (test_count++); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 assert_valid("<number>", "2.3e4"); | 53 assert_valid("<number>", "2.3e4"); |
| 54 assert_valid("<integer>", "-109"); | 54 assert_valid("<integer>", "-109"); |
| 55 assert_valid("<integer>", "19"); | 55 assert_valid("<integer>", "19"); |
| 56 | 56 |
| 57 assert_valid("<angle>", "10deg"); | 57 assert_valid("<angle>", "10deg"); |
| 58 assert_valid("<angle>", "20.5rad"); | 58 assert_valid("<angle>", "20.5rad"); |
| 59 assert_valid("<angle>", "calc(50grad + 3.14159rad)"); | 59 assert_valid("<angle>", "calc(50grad + 3.14159rad)"); |
| 60 assert_valid("<time>", "2s"); | 60 assert_valid("<time>", "2s"); |
| 61 assert_valid("<time>", "calc(2s - 9ms)"); | 61 assert_valid("<time>", "calc(2s - 9ms)"); |
| 62 assert_valid("<resolution>", "10dpi"); | 62 assert_valid("<resolution>", "10dpi"); |
| 63 assert_valid("<resolution>", "3dPpX"); |
| 63 assert_valid("<resolution>", "-5.3dpcm"); | 64 assert_valid("<resolution>", "-5.3dpcm"); |
| 64 assert_valid("<transform-function>", "scale(2)"); | 65 assert_valid("<transform-function>", "scale(2)"); |
| 65 assert_valid("<transform-function>+", "translateX(2px) rotate(20deg)"); | 66 assert_valid("<transform-function>+", "translateX(2px) rotate(20deg)"); |
| 66 | 67 |
| 67 assert_valid("<color>", "rgb(12, 34, 56)"); | 68 assert_valid("<color>", "rgb(12, 34, 56)"); |
| 68 assert_valid("<color>", "lightgoldenrodyellow"); | 69 assert_valid("<color>", "lightgoldenrodyellow"); |
| 69 assert_valid("<image>", "url(a)"); | 70 assert_valid("<image>", "url(a)"); |
| 70 assert_valid("<image>", "linear-gradient(yellow, blue)"); | 71 assert_valid("<image>", "linear-gradient(yellow, blue)"); |
| 71 assert_valid("<url>", "url(a)"); | 72 assert_valid("<url>", "url(a)"); |
| 72 | 73 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 assert_invalid("<number>|foo", "foo var(--foo, bla)"); | 147 assert_invalid("<number>|foo", "foo var(--foo, bla)"); |
| 147 | 148 |
| 148 assert_invalid("<angle>", "10%"); | 149 assert_invalid("<angle>", "10%"); |
| 149 assert_invalid("<time>", "2px"); | 150 assert_invalid("<time>", "2px"); |
| 150 assert_invalid("<resolution>", "10"); | 151 assert_invalid("<resolution>", "10"); |
| 151 assert_invalid("<transform-function>", "scale()"); | 152 assert_invalid("<transform-function>", "scale()"); |
| 152 assert_invalid("<color>", "fancy-looking"); | 153 assert_invalid("<color>", "fancy-looking"); |
| 153 assert_invalid("<image>", "banana.png"); | 154 assert_invalid("<image>", "banana.png"); |
| 154 assert_invalid("<url>", "banana.png"); | 155 assert_invalid("<url>", "banana.png"); |
| 155 </script> | 156 </script> |
| OLD | NEW |