| OLD | NEW |
| 1 This test checks the SVGPaint API | 1 This test checks the SVGPaint API |
| 2 | 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 Check initial paint values | 7 Check initial paint values |
| 8 PASS (fillPaint = rectElement.style.getPropertyCSSValue('fill')).toString() is "
[object SVGPaint]" | 8 PASS (fillPaint = rectElement.style.getPropertyCSSValue('fill')).toString() is "
[object SVGPaint]" |
| 9 PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR | 9 PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR |
| 10 PASS fillPaint.uri is "" | 10 PASS fillPaint.uri is "" |
| 11 PASS fillPaint.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR | 11 PASS fillPaint.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR |
| 12 PASS (fillColor = fillPaint.rgbColor).toString() is "[object RGBColor]" | 12 PASS (fillColor = fillPaint.rgbColor).toString() is "[object RGBColor]" |
| 13 PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 | 13 PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 |
| 14 PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128 | 14 PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128 |
| 15 PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 | 15 PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 |
| 16 PASS rectElement.style.fill is "#008000" | 16 PASS rectElement.style.fill is "#008000" |
| 17 PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000" | 17 PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000" |
| 18 | 18 |
| 19 Try invalid arguments for setPaint() | 19 Try invalid arguments for setPaint() |
| 20 PASS fillPaint.setPaint(null, null, null, null) threw exception NoModificationAl
lowedError: An attempt was made to modify an object where modifications are not
allowed.. | 20 PASS fillPaint.setPaint(null, null, null, null) threw exception NoModificationAl
lowedError: An attempt was made to modify an object where modifications are not
allowed.. |
| 21 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_RGBCOLOR, svgElement, '', ''); th
rew exception NoModificationAllowedError: An attempt was made to modify an objec
t where modifications are not allowed.. | 21 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_RGBCOLOR, svgElement, '', ''); th
rew exception NoModificationAllowedError: An attempt was made to modify an objec
t where modifications are not allowed.. |
| 22 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_RGBCOLOR, '', '') threw exception
TypeError: Not enough arguments. | 22 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_RGBCOLOR, '', '') threw exception
TypeError: Failed to execute 'setPaint' on 'SVGPaint': 4 arguments required, bu
t only 3 present.. |
| 23 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR + 1, '', '', ''
); threw exception NoModificationAllowedError: An attempt was made to modify an
object where modifications are not allowed.. | 23 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR + 1, '', '', ''
); threw exception NoModificationAllowedError: An attempt was made to modify an
object where modifications are not allowed.. |
| 24 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_NONE - 1, '', '', ''); threw exce
ption NoModificationAllowedError: An attempt was made to modify an object where
modifications are not allowed.. | 24 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_NONE - 1, '', '', ''); threw exce
ption NoModificationAllowedError: An attempt was made to modify an object where
modifications are not allowed.. |
| 25 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI + 1, '', '', ''); threw excep
tion NoModificationAllowedError: An attempt was made to modify an object where m
odifications are not allowed.. | 25 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_URI + 1, '', '', ''); threw excep
tion NoModificationAllowedError: An attempt was made to modify an object where m
odifications are not allowed.. |
| 26 PASS fillPaint.setPaint() threw exception TypeError: Not enough arguments. | 26 PASS fillPaint.setPaint() threw exception TypeError: Failed to execute 'setPaint
' on 'SVGPaint': 4 arguments required, but only 0 present.. |
| 27 PASS fillPaint.setPaint(fillPaint) threw exception TypeError: Not enough argumen
ts. | 27 PASS fillPaint.setPaint(fillPaint) threw exception TypeError: Failed to execute
'setPaint' on 'SVGPaint': 4 arguments required, but only 1 present.. |
| 28 | 28 |
| 29 Try invalid arguments for setUri() | 29 Try invalid arguments for setUri() |
| 30 PASS fillPaint.setUri() threw exception TypeError: Not enough arguments. | 30 PASS fillPaint.setUri() threw exception TypeError: Failed to execute 'setUri' on
'SVGPaint': 1 argument required, but only 0 present.. |
| 31 | 31 |
| 32 Try assigning to the readonly paintType property, which silently fails | 32 Try assigning to the readonly paintType property, which silently fails |
| 33 PASS fillPaint.paintType = SVGPaint.SVG_PAINTTYPE_UNKKNOWN; is undefined. | 33 PASS fillPaint.paintType = SVGPaint.SVG_PAINTTYPE_UNKKNOWN; is undefined. |
| 34 PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR | 34 PASS fillPaint.paintType is SVGPaint.SVG_PAINTTYPE_RGBCOLOR |
| 35 PASS rectElement.style.fill is "#008000" | 35 PASS rectElement.style.fill is "#008000" |
| 36 PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000" | 36 PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000" |
| 37 | 37 |
| 38 Test using setPaint() and SVG_PAINTTYPE_UNKNOWN | 38 Test using setPaint() and SVG_PAINTTYPE_UNKNOWN |
| 39 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_UNKKNOWN, '', '', '') threw excep
tion NoModificationAllowedError: An attempt was made to modify an object where m
odifications are not allowed.. | 39 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_UNKKNOWN, '', '', '') threw excep
tion NoModificationAllowedError: An attempt was made to modify an object where m
odifications are not allowed.. |
| 40 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_UNKKNOWN, 'url(#foo)', '', '') th
rew exception NoModificationAllowedError: An attempt was made to modify an objec
t where modifications are not allowed.. | 40 PASS fillPaint.setPaint(SVGPaint.SVG_PAINTTYPE_UNKKNOWN, 'url(#foo)', '', '') th
rew exception NoModificationAllowedError: An attempt was made to modify an objec
t where modifications are not allowed.. |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 PASS (fillColor = fillPaint.rgbColor).toString() is "[object RGBColor]" | 235 PASS (fillColor = fillPaint.rgbColor).toString() is "[object RGBColor]" |
| 236 PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 | 236 PASS fillColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 |
| 237 PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128 | 237 PASS fillColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128 |
| 238 PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 | 238 PASS fillColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 |
| 239 PASS rectElement.style.fill is "#008000" | 239 PASS rectElement.style.fill is "#008000" |
| 240 PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000" | 240 PASS document.defaultView.getComputedStyle(rectElement).fill is "#008000" |
| 241 PASS successfullyParsed is true | 241 PASS successfullyParsed is true |
| 242 | 242 |
| 243 TEST COMPLETE | 243 TEST COMPLETE |
| 244 | 244 |
| OLD | NEW |