blob: 19f4f65bf09934cf5e3e0af7018ab122ce1fef7c [file] [log] [blame]
This is a test of precedency between CSS and SVG transform
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Also, to pass the test, the rectangle should be rotated with 45deg
Test SVGTransformList interface
PASS circle.transform.baseVal.numberOfItems is 0
PASS circle.getAttribute('transform') is null
PASS rect.transform.baseVal.numberOfItems is 2
PASS rect.getAttribute('transform') is "translate(1000, 1000) rotate(90)"
PASS dumpTransform(rect.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 1000.0 1000.0]"
PASS dumpTransform(rect.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_ROTATE matrix=[0.0 1.0 -1.0 0.0 0.0 0.0]"
Test SVGLocatable interface
PASS dumpMatrix(circle.getCTM()) is "[2.0 0.0 0.0 2.0 20.0 20.0]"
PASS dumpMatrix(circle.getScreenCTM()) is "[2.0 0.0 0.0 2.0 28.0 28.0]"
PASS dumpRect(circle.getBBox()) is "[0 0 80 80]"
PASS dumpMatrix(circle.getTransformToElement(circle)) is "[1.0 0.0 0.0 1.0 0.0 0.0]"
PASS dumpMatrix(rect.getCTM()) is "[0.7 0.7 -0.7 0.7 100.0 0.0]"
PASS dumpMatrix(rect.getScreenCTM()) is "[0.7 0.7 -0.7 0.7 312.0 8.0]"
PASS dumpRect(rect.getBBox()) is "[40 40 100 100]"
PASS dumpMatrix(rect.getTransformToElement(rect)) is "[1.0 0.0 0.0 1.0 0.0 0.0]"
Test CSSMatrix
PASS circle.style.webkitTransform is "scale(2, 2) translate(10px, 10px)"
PASS dumpMatrix(new WebKitCSSMatrix(circle.style.webkitTransform)) is "[2.0 0.0 0.0 2.0 20.0 20.0]"
PASS rect.style.webkitTransform is "translate(100px) rotate(45deg)"
PASS dumpMatrix(new WebKitCSSMatrix(rect.style.webkitTransform)) is "[0.7 0.7 -0.7 0.7 100.0 0.0]"
PASS dumpMatrix(new WebKitCSSMatrix(circle.style.webkitTransform)) is dumpMatrix(circle.getCTM())
PASS dumpMatrix(new WebKitCSSMatrix(rect.style.webkitTransform)) is dumpMatrix(rect.getCTM())
PASS successfullyParsed is true
TEST COMPLETE