| 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 Error: NoModificationA
llowedError: DOM Exception 7. | 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 Error: NoModificationAllowedError: DOM Exception 7. | 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
Error: NoModificationAllowedError: DOM Exception 7. | 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 Error: NoModificationAllowedError: DOM Exception 7. | 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: Not enough arguments. |
| 23 PASS stopColor.setColor(stopColor) threw exception TypeError: Not enough argumen
ts. | 23 PASS stopColor.setColor(stopColor) threw exception TypeError: Not enough argumen
ts. |
| 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
Error: NoModificationAllowedError: DOM Exception 7. | 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 Error: NoModificationAllowedError: DOM Exception 7. | 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.. |
| 34 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_UNKKNOWN, '', 'icc-color(myRGB, 0
, 1, 2)') threw exception Error: NoModificationAllowedError: DOM Exception 7. | 34 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_UNKKNOWN, '', 'icc-color(myRGB, 0
, 1, 2)') threw exception NoModificationAllowedError: An attempt was made to mod
ify an object where modifications are not allowed.. |
| 35 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_UNKKNOWN, 'rgb(0,0,0)', 'icc-colo
r(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError: DOM Excep
tion 7. | 35 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_UNKKNOWN, 'rgb(0,0,0)', 'icc-colo
r(myRGB, 0, 1, 2)') threw exception NoModificationAllowedError: An attempt was m
ade to modify an object where modifications are not allowed.. |
| 36 | 36 |
| 37 Test using setColor() and SVG_COLORTYPE_RGBCOLOR_ICCCOLOR | 37 Test using setColor() and SVG_COLORTYPE_RGBCOLOR_ICCCOLOR |
| 38 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_RGBCOLOR_ICCCOLOR, 'rgb(77,0,77)'
, 'icc-color(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError
: DOM Exception 7. | 38 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_RGBCOLOR_ICCCOLOR, 'rgb(77,0,77)'
, 'icc-color(myRGB, 0, 1, 2)') threw exception NoModificationAllowedError: An at
tempt was made to modify an object where modifications are not allowed.. |
| 39 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR | 39 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR |
| 40 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR | 40 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR |
| 41 PASS (rgbColor = stopColor.rgbColor).toString() is "[object RGBColor]" | 41 PASS (rgbColor = stopColor.rgbColor).toString() is "[object RGBColor]" |
| 42 PASS rgbColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255 | 42 PASS rgbColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255 |
| 43 PASS rgbColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 | 43 PASS rgbColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 |
| 44 PASS rgbColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 | 44 PASS rgbColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 |
| 45 PASS stopElement.style.stopColor is "#ff0000" | 45 PASS stopElement.style.stopColor is "#ff0000" |
| 46 PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(255, 0
, 0)" | 46 PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(255, 0
, 0)" |
| 47 | 47 |
| 48 Test using setColor() and SVG_COLORTYPE_CURRENTCOLOR | 48 Test using setColor() and SVG_COLORTYPE_CURRENTCOLOR |
| 49 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_CURRENTCOLOR, 'rgb(77,0,77)', 'ic
c-color(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError: DOM
Exception 7. | 49 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_CURRENTCOLOR, 'rgb(77,0,77)', 'ic
c-color(myRGB, 0, 1, 2)') threw exception NoModificationAllowedError: An attempt
was made to modify an object where modifications are not allowed.. |
| 50 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR | 50 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR |
| 51 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR | 51 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR |
| 52 PASS (rgbColor = stopColor.rgbColor).toString() is "[object RGBColor]" | 52 PASS (rgbColor = stopColor.rgbColor).toString() is "[object RGBColor]" |
| 53 PASS rgbColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255 | 53 PASS rgbColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 255 |
| 54 PASS rgbColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 | 54 PASS rgbColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 |
| 55 PASS rgbColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 | 55 PASS rgbColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 |
| 56 PASS stopElement.style.stopColor is "#ff0000" | 56 PASS stopElement.style.stopColor is "#ff0000" |
| 57 PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(255, 0
, 0)" | 57 PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(255, 0
, 0)" |
| 58 | 58 |
| 59 Test using setColor() and SVG_COLORTYPE_RGBCOLOR | 59 Test using setColor() and SVG_COLORTYPE_RGBCOLOR |
| 60 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_RGBCOLOR, 'rgb(0,77,0)', 'icc-col
or(myRGB, 0, 1, 2)') threw exception Error: NoModificationAllowedError: DOM Exce
ption 7. | 60 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_RGBCOLOR, 'rgb(0,77,0)', 'icc-col
or(myRGB, 0, 1, 2)') threw exception NoModificationAllowedError: An attempt was
made to modify an object where modifications are not allowed.. |
| 61 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR | 61 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR |
| 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 |