| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../resources/js-test.js"></script> | 4 <script src="../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <script> | 7 <script> |
| 8 description("Test window.CSS.supports()"); | 8 description("Test window.CSS.supports()"); |
| 9 | 9 |
| 10 shouldBeTrue('CSS.supports("(display: none)")'); | 10 shouldBeTrue('CSS.supports("(display: none)")'); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Bad syntax. Can't mix operators without a layer of parentheses.. | 30 // Bad syntax. Can't mix operators without a layer of parentheses.. |
| 31 shouldBeFalse('CSS.supports("(display: none) and (display: block) or (displa
y: inline)")'); | 31 shouldBeFalse('CSS.supports("(display: none) and (display: block) or (displa
y: inline)")'); |
| 32 shouldBeFalse('CSS.supports("not (display: deadbeef) and (display: block)")'
); | 32 shouldBeFalse('CSS.supports("not (display: deadbeef) and (display: block)")'
); |
| 33 | 33 |
| 34 // Mix 'n match. | 34 // Mix 'n match. |
| 35 shouldBeTrue('CSS.supports("(not (border: 1px 1px 1px 1px 1px solid #000)) a
nd (display: block)")'); | 35 shouldBeTrue('CSS.supports("(not (border: 1px 1px 1px 1px 1px solid #000)) a
nd (display: block)")'); |
| 36 shouldBeTrue('CSS.supports("(display: block !important) and ((display: inlin
e) or (display: deadbeef))")'); | 36 shouldBeTrue('CSS.supports("(display: block !important) and ((display: inlin
e) or (display: deadbeef))")'); |
| 37 shouldBeTrue('CSS.supports("not ((not (display: block)) or ((display: none)
and (deadbeef: 1px)))")'); | 37 shouldBeTrue('CSS.supports("not ((not (display: block)) or ((display: none)
and (deadbeef: 1px)))")'); |
| 38 | 38 |
| 39 // Whitespace/Syntax. | 39 // Whitespace/Syntax. |
| 40 shouldBeTrue('CSS.supports("not( display: deadbeef)")'); | 40 shouldBeFalse('CSS.supports("not( display: deadbeef)")'); |
| 41 shouldBeTrue('CSS.supports("(display: none)and ( -webkit-transition: all 1
s )")'); | 41 shouldBeFalse('CSS.supports("(display: none)and ( -webkit-transition: all
1s )")'); |
| 42 shouldBeTrue('CSS.supports("(display: none)or(-webkit-transition: all 1s)")'
); | 42 shouldBeFalse('CSS.supports("(display: none)or(-webkit-transition: all 1s)")
'); |
| 43 shouldBeTrue('CSS.supports("(display: none) or(-webkit-transition: all 1s
)")'); | 43 shouldBeFalse('CSS.supports("(display: none) or(-webkit-transition: all 1s
)")'); |
| 44 shouldBeTrue('CSS.supports("(((((((display: none)))))))")'); | 44 shouldBeTrue('CSS.supports("(((((((display: none)))))))")'); |
| 45 shouldBeFalse('CSS.supports("(!important)")'); | 45 shouldBeFalse('CSS.supports("(!important)")'); |
| 46 shouldBeFalse('CSS.supports("not not not not (display: none)")'); | 46 shouldBeFalse('CSS.supports("not not not not (display: none)")'); |
| 47 | 47 |
| 48 // Functions. | 48 // Functions. |
| 49 shouldBeTrue('CSS.supports("(top: -webkit-calc(80% - 20px))")'); | 49 shouldBeTrue('CSS.supports("(top: -webkit-calc(80% - 20px))")'); |
| 50 shouldBeTrue('CSS.supports("(background-color: rgb(0, 128, 0))")'); | 50 shouldBeTrue('CSS.supports("(background-color: rgb(0, 128, 0))")'); |
| 51 shouldBeTrue('CSS.supports("(background: url(\'/blah\'))")'); | 51 shouldBeTrue('CSS.supports("(background: url(\'/blah\'))")'); |
| 52 shouldBeTrue('CSS.supports("((top: -webkit-calc(80% - 20px)) and (not (backg
round-color: rgb(0, 128, 0)))) or (background: url(\'/blah\'))")'); | 52 shouldBeTrue('CSS.supports("((top: -webkit-calc(80% - 20px)) and (not (backg
round-color: rgb(0, 128, 0)))) or (background: url(\'/blah\'))")'); |
| 53 shouldBeFalse('CSS.supports("(background: invalid(\'/blah\'))")'); | 53 shouldBeFalse('CSS.supports("(background: invalid(\'/blah\'))")'); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 79 shouldBeFalse('CSS.supports([], "none")'); | 79 shouldBeFalse('CSS.supports([], "none")'); |
| 80 shouldBeFalse('CSS.supports("display", "")'); | 80 shouldBeFalse('CSS.supports("display", "")'); |
| 81 shouldBeFalse('CSS.supports("display:", "none")'); | 81 shouldBeFalse('CSS.supports("display:", "none")'); |
| 82 shouldBeTrue('CSS.supports("z-index", 1)'); | 82 shouldBeTrue('CSS.supports("z-index", 1)'); |
| 83 shouldBeFalse('CSS.supports("content", [])'); | 83 shouldBeFalse('CSS.supports("content", [])'); |
| 84 shouldBeFalse('CSS.supports("content", "!important")'); | 84 shouldBeFalse('CSS.supports("content", "!important")'); |
| 85 shouldBeFalse('CSS.supports("(display: none)", undefined)'); | 85 shouldBeFalse('CSS.supports("(display: none)", undefined)'); |
| 86 </script> | 86 </script> |
| 87 </body> | 87 </body> |
| 88 </html> | 88 </html> |
| OLD | NEW |