210 lines
8.4 KiB
Plaintext
210 lines
8.4 KiB
Plaintext
Tests parsing and re-serializing of various valid and invalid calc expressions.
|
|
|
|
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
|
|
|
|
|
|
|
element.style["width"] = "calc(100px)"
|
|
PASS element.style['width'] is "calc(100px)"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "100px"
|
|
|
|
element.style["width"] = "max(100px + 200px)"
|
|
PASS element.style['width'] is "max(300px)"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "300px"
|
|
|
|
element.style["width"] = "max(100px , 200px)"
|
|
PASS element.style['width'] is "max(200px)"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "200px"
|
|
|
|
element.style["width"] = "max(100px,200px)"
|
|
PASS element.style['width'] is "max(200px)"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "200px"
|
|
|
|
element.style["width"] = "clamp(100px,123px,200px)"
|
|
PASS element.style['width'] is "clamp(100px, 123px, 200px)"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "123px"
|
|
|
|
element.style["width"] = "clamp(100px,300px,200px)"
|
|
PASS element.style['width'] is "clamp(100px, 300px, 200px)"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "200px"
|
|
|
|
element.style["width"] = "clamp(200px,300px,100px)"
|
|
PASS element.style['width'] is "clamp(200px, 300px, 100px)"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "200px"
|
|
|
|
element.style["width"] = "clamp((50px + 50px),40px,200px)"
|
|
PASS element.style['width'] is "clamp(100px, 40px, 200px)"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "100px"
|
|
|
|
element.style["width"] = "clamp(50px + 50px,40px,200px)"
|
|
PASS element.style['width'] is "clamp(100px, 40px, 200px)"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "100px"
|
|
|
|
element.style["width"] = "min(100px,0%)"
|
|
PASS element.style['width'] is "min(100px, 0%)"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "0px"
|
|
|
|
element.style["width"] = "max(100px,0%)"
|
|
PASS element.style['width'] is "max(100px, 0%)"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "100px"
|
|
|
|
element.style["width"] = "clamp(100px,0%,1%)"
|
|
PASS element.style['width'] is "clamp(100px, 0%, 1%)"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "100px"
|
|
|
|
element.style["width"] = "calc(100px, 200px)"
|
|
PASS element.style['width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "999px"
|
|
|
|
element.style["width"] = "calc(100px 200px)"
|
|
PASS element.style['width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "999px"
|
|
|
|
element.style["width"] = "calc(100px ( 200px)"
|
|
PASS element.style['width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "999px"
|
|
|
|
element.style["width"] = "min(100px 200px)"
|
|
PASS element.style['width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "999px"
|
|
|
|
element.style["width"] = "max(100px 200px)"
|
|
PASS element.style['width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "999px"
|
|
|
|
element.style["width"] = "max(100px,, 200px)"
|
|
PASS element.style['width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "999px"
|
|
|
|
element.style["width"] = "max(100px, , 200px)"
|
|
PASS element.style['width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "999px"
|
|
|
|
element.style["width"] = "max(100px, 200px,)"
|
|
PASS element.style['width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "999px"
|
|
|
|
element.style["width"] = "clamp(200px,300px)"
|
|
PASS element.style['width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "999px"
|
|
|
|
element.style["width"] = "clamp(200px,300px,)"
|
|
PASS element.style['width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "999px"
|
|
|
|
element.style["width"] = "clamp(200px,,300px)"
|
|
PASS element.style['width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "999px"
|
|
|
|
element.style["width"] = "clamp((),,300px)"
|
|
PASS element.style['width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "999px"
|
|
|
|
element.style["width"] = "clamp(1px,2px,2px,4px)"
|
|
PASS element.style['width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('width') is "999px"
|
|
|
|
element.style["min-width"] = "calc(100px)"
|
|
PASS element.style['min-width'] is "calc(100px)"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "100px"
|
|
|
|
element.style["min-width"] = "max(100px + 200px)"
|
|
PASS element.style['min-width'] is "max(300px)"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "300px"
|
|
|
|
element.style["min-width"] = "max(100px , 200px)"
|
|
PASS element.style['min-width'] is "max(200px)"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "200px"
|
|
|
|
element.style["min-width"] = "max(100px,200px)"
|
|
PASS element.style['min-width'] is "max(200px)"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "200px"
|
|
|
|
element.style["min-width"] = "clamp(100px,123px,200px)"
|
|
PASS element.style['min-width'] is "clamp(100px, 123px, 200px)"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "123px"
|
|
|
|
element.style["min-width"] = "clamp(100px,300px,200px)"
|
|
PASS element.style['min-width'] is "clamp(100px, 300px, 200px)"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "200px"
|
|
|
|
element.style["min-width"] = "clamp(200px,300px,100px)"
|
|
PASS element.style['min-width'] is "clamp(200px, 300px, 100px)"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "200px"
|
|
|
|
element.style["min-width"] = "clamp((50px + 50px),40px,200px)"
|
|
PASS element.style['min-width'] is "clamp(100px, 40px, 200px)"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "100px"
|
|
|
|
element.style["min-width"] = "clamp(50px + 50px,40px,200px)"
|
|
PASS element.style['min-width'] is "clamp(100px, 40px, 200px)"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "100px"
|
|
|
|
element.style["min-width"] = "min(100px,0%)"
|
|
PASS element.style['min-width'] is "min(100px, 0%)"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "min(100px, 0%)"
|
|
|
|
element.style["min-width"] = "max(100px,0%)"
|
|
PASS element.style['min-width'] is "max(100px, 0%)"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "max(100px, 0%)"
|
|
|
|
element.style["min-width"] = "clamp(100px,0%,1%)"
|
|
PASS element.style['min-width'] is "clamp(100px, 0%, 1%)"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "clamp(100px, 0%, 1%)"
|
|
|
|
element.style["min-width"] = "calc(100px, 200px)"
|
|
PASS element.style['min-width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "999px"
|
|
|
|
element.style["min-width"] = "calc(100px 200px)"
|
|
PASS element.style['min-width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "999px"
|
|
|
|
element.style["min-width"] = "calc(100px ( 200px)"
|
|
PASS element.style['min-width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "999px"
|
|
|
|
element.style["min-width"] = "min(100px 200px)"
|
|
PASS element.style['min-width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "999px"
|
|
|
|
element.style["min-width"] = "max(100px 200px)"
|
|
PASS element.style['min-width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "999px"
|
|
|
|
element.style["min-width"] = "max(100px,, 200px)"
|
|
PASS element.style['min-width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "999px"
|
|
|
|
element.style["min-width"] = "max(100px, , 200px)"
|
|
PASS element.style['min-width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "999px"
|
|
|
|
element.style["min-width"] = "max(100px, 200px,)"
|
|
PASS element.style['min-width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "999px"
|
|
|
|
element.style["min-width"] = "clamp(200px,300px)"
|
|
PASS element.style['min-width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "999px"
|
|
|
|
element.style["min-width"] = "clamp(200px,300px,)"
|
|
PASS element.style['min-width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "999px"
|
|
|
|
element.style["min-width"] = "clamp(200px,,300px)"
|
|
PASS element.style['min-width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "999px"
|
|
|
|
element.style["min-width"] = "clamp((),,300px)"
|
|
PASS element.style['min-width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "999px"
|
|
|
|
element.style["min-width"] = "clamp(1px,2px,2px,4px)"
|
|
PASS element.style['min-width'] is "999px"
|
|
PASS getComputedStyle(element).getPropertyValue('min-width') is "999px"
|
|
PASS successfullyParsed is true
|
|
|
|
TEST COMPLETE
|
|
|