weinig@apple.com | 25cef10 | 2008-10-09 00:14:50 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| 2 | <html> |
| 3 | <head> |
mark.lam@apple.com | b130a34 | 2013-09-07 22:48:36 +0000 | [diff] [blame] | 4 | <script src="../../resources/js-test-pre.js"></script> |
weinig@apple.com | 25cef10 | 2008-10-09 00:14:50 +0000 | [diff] [blame] | 5 | </head> |
| 6 | <body> |
ap@apple.com | 92352d0 | 2017-05-24 22:53:00 +0000 | [diff] [blame] | 7 | <script> |
| 8 | description("This test ensures that objects RGBColor objects return the correct values."); |
| 9 | |
| 10 | var element = document.createElement('div'); |
| 11 | document.documentElement.appendChild(element); |
| 12 | element.style.color = "rgb(10, 20, 30)"; |
| 13 | |
| 14 | shouldBe("window.getComputedStyle(element, '').getPropertyCSSValue('color').getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "10"); |
| 15 | shouldBe("window.getComputedStyle(element, '').getPropertyCSSValue('color').getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "20"); |
| 16 | shouldBe("window.getComputedStyle(element, '').getPropertyCSSValue('color').getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "30"); |
| 17 | </script> |
mark.lam@apple.com | b130a34 | 2013-09-07 22:48:36 +0000 | [diff] [blame] | 18 | <script src="../../resources/js-test-post.js"></script> |
weinig@apple.com | 25cef10 | 2008-10-09 00:14:50 +0000 | [diff] [blame] | 19 | </body> |
| 20 | </html> |