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]" |
(...skipping 25 matching lines...) Expand all Loading... |
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)') is undefined. | 38 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_RGBCOLOR_ICCCOLOR, 'rgb(77,0,77)'
, 'icc-color(myRGB, 0, 1, 2)') is undefined. |
39 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR_ICCCOLOR | 39 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR_ICCCOLOR |
40 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR_ICCCOLOR | 40 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_RGBCOLOR_ICCCOLOR |
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 77 | 42 PASS rgbColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 77 |
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 77 | 44 PASS rgbColor.blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 77 |
45 PASS stopElement.style.stopColor is "#4d004d" | 45 PASS stopElement.style.stopColor is "#4d004d" |
46 PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(77, 0,
77)" | 46 FAIL document.defaultView.getComputedStyle(stopElement).stopColor should be rgb(
77, 0, 77). Was 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)') is undefined. | 49 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_CURRENTCOLOR, 'rgb(77,0,77)', 'ic
c-color(myRGB, 0, 1, 2)') is undefined. |
50 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_CURRENTCOLOR | 50 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_CURRENTCOLOR |
51 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_CURRENTCOLOR | 51 PASS stopColor.colorType is SVGColor.SVG_COLORTYPE_CURRENTCOLOR |
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 0 | 53 PASS rgbColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 |
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 "currentColor" | 56 PASS stopElement.style.stopColor is "currentColor" |
57 PASS document.defaultView.getComputedStyle(stopElement).stopColor is "rgb(0, 128
, 0)" | 57 FAIL document.defaultView.getComputedStyle(stopElement).stopColor should be rgb(
0, 128, 0). Was 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)') is undefined. | 60 PASS stopColor.setColor(SVGColor.SVG_COLORTYPE_RGBCOLOR, 'rgb(0,77,0)', 'icc-col
or(myRGB, 0, 1, 2)') is undefined. |
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 0 | 64 PASS rgbColor.red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 |
65 PASS rgbColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 77 | 65 PASS rgbColor.green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 77 |
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(0, 77,
0)" | 67 FAIL document.defaultView.getComputedStyle(stopElement).stopColor should be rgb(
0, 77, 0). Was 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 |