| OLD | NEW |
| 1 This test checks the SVGColor API | 1 This test checks the SVGColor 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 color values | 7 Check initial color values |
| 8 PASS (stopColor = stopElement.style.getPropertyCSSValue('stop-color')).toString(
) is "[object SVGColor]" | 8 PASS (stopColor = stopElement.style.getPropertyCSSValue('stop-color')).toString(
) is "[object SVGColor]" |
| 9 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR | 9 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR |
| 10 PASS (rgbColor = stopColor.rgbColor).toString() is "[object RGBColor]" | 10 PASS (rgbColor = stopColor.rgbColor).toString() is "[object RGBColor]" |
| 11 PASS rgbColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255 | 11 PASS rgbColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255 |
| 12 PASS rgbColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 | 12 PASS rgbColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 |
| 13 PASS rgbColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 | 13 PASS rgbColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 |
| 14 PASS stopElement.style.stopColor is "#ff0000" | 14 PASS stopElement.style.stopColor is "#ff0000" |
| 15 PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(255, 0
, 0)" | 15 PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(255, 0
, 0)" |
| 16 | 16 |
| 17 Try invalid arguments for setColor() | 17 Try invalid arguments for setColor() |
| 18 PASS stopColor.setColor(null, null, null) threw exception NoModificationAllowedE
rror: An attempt was made to modify an object where modifications are not allowe
d.. | 18 PASS stopColor.setColor(null, null, null) threw exception NoModificationAllowedE
rror: An attempt was made to modify an object where modifications are not allowe
d.. |
| 19 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_RGBCOLOR, svgElement, ''); threw
exception NoModificationAllowedError: An attempt was made to modify an object wh
ere modifications are not allowed.. | 19 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_RGBCOLOR, svgElement, ''); threw
exception NoModificationAllowedError: An attempt was made to modify an object wh
ere modifications are not allowed.. |
| 20 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_RGBCOLOR, '', '') threw exception
NoModificationAllowedError: An attempt was made to modify an object where modif
ications are not allowed.. | 20 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_RGBCOLOR, '', '') threw exception
NoModificationAllowedError: An attempt was made to modify an object where modif
ications are not allowed.. |
| 21 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_CURRENTCOLOR + 1, '', ''); threw
exception NoModificationAllowedError: An attempt was made to modify an object wh
ere modifications are not allowed.. | 21 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_CURRENTCOLOR + 1, '', ''); threw
exception NoModificationAllowedError: An attempt was made to modify an object wh
ere modifications are not allowed.. |
| 22 PASS stopColor.setColor() threw exception TypeError: Not enough arguments. | 22 PASS stopColor.setColor() threw exception TypeError: Failed to execute 'setColor
' on 'SVGColor': 3 arguments required, but only 0 present.. |
| 23 PASS stopColor.setColor(stopColor) threw exception TypeError: Not enough argumen
ts. | 23 PASS stopColor.setColor(stopColor) threw exception TypeError: Failed to execute
'setColor' on 'SVGColor': 3 arguments required, but only 1 present.. |
| 24 | 24 |
| 25 Try assigning to the readonly colorType property, which silently fails | 25 Try assigning to the readonly colorType property, which silently fails |
| 26 PASS stopColor.colorType = SVGColor.SVG_COLORTYPE_UNKKNOWN; is undefined. | 26 PASS stopColor.colorType = SVGColor.SVG_COLORTYPE_UNKKNOWN; is undefined. |
| 27 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR | 27 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR |
| 28 PASS stopElement.style.stopColor is "#ff0000" | 28 PASS stopElement.style.stopColor is "#ff0000" |
| 29 PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(255, 0
, 0)" | 29 PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(255, 0
, 0)" |
| 30 | 30 |
| 31 Test using setColor() and SVG_COLORTYPE_UNKNOWN | 31 Test using setColor() and SVG_COLORTYPE_UNKNOWN |
| 32 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_UNKKNOWN, '', '') threw exception
NoModificationAllowedError: An attempt was made to modify an object where modif
ications are not allowed.. | 32 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_UNKKNOWN, '', '') threw exception
NoModificationAllowedError: An attempt was made to modify an object where modif
ications are not allowed.. |
| 33 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_UNKKNOWN, 'rgb(0,128,128)', '') t
hrew exception NoModificationAllowedError: An attempt was made to modify an obje
ct where modifications are not allowed.. | 33 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_UNKKNOWN, 'rgb(0,128,128)', '') t
hrew exception NoModificationAllowedError: An attempt was made to modify an obje
ct where modifications are not allowed.. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 62 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR | 62 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR |
| 63 PASS (rgbColor = stopColor.rgbColor).toString() is "[object RGBColor]" | 63 PASS (rgbColor = stopColor.rgbColor).toString() is "[object RGBColor]" |
| 64 PASS rgbColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255 | 64 PASS rgbColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255 |
| 65 PASS rgbColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 | 65 PASS rgbColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 |
| 66 PASS rgbColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 | 66 PASS rgbColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 |
| 67 PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(255, 0
, 0)" | 67 PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(255, 0
, 0)" |
| 68 PASS successfullyParsed is true | 68 PASS successfullyParsed is true |
| 69 | 69 |
| 70 TEST COMPLETE | 70 TEST COMPLETE |
| 71 | 71 |
| OLD | NEW |