blob: 5b7d4b481c8e70f9403f7440ae1290a6d3b5b2ee [file] [log] [blame]
weinig@apple.com25cef102008-10-09 00:14:50 +00001<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2<html>
3<head>
mark.lam@apple.comb130a342013-09-07 22:48:36 +00004<script src="../../resources/js-test-pre.js"></script>
weinig@apple.com25cef102008-10-09 00:14:50 +00005</head>
6<body>
ap@apple.com92352d02017-05-24 22:53:00 +00007<script>
8description("This test ensures that objects RGBColor objects return the correct values.");
9
10var element = document.createElement('div');
11document.documentElement.appendChild(element);
12element.style.color = "rgb(10, 20, 30)";
13
14shouldBe("window.getComputedStyle(element, '').getPropertyCSSValue('color').getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "10");
15shouldBe("window.getComputedStyle(element, '').getPropertyCSSValue('color').getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "20");
16shouldBe("window.getComputedStyle(element, '').getPropertyCSSValue('color').getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "30");
17</script>
mark.lam@apple.comb130a342013-09-07 22:48:36 +000018<script src="../../resources/js-test-post.js"></script>
weinig@apple.com25cef102008-10-09 00:14:50 +000019</body>
20</html>