(element, red, green, blue, property)
| 18 | } |
| 19 | |
| 20 | function expectColor(element, red, green, blue, property) { |
| 21 | if (typeof property != "string") |
| 22 | color = getComputedStyle(element).getPropertyValue("color"); |
| 23 | else |
| 24 | color = getComputedStyle(element).getPropertyValue(property); |
| 25 | var re = new RegExp("rgba?\\(([^, ]*), ([^, ]*), ([^, ]*)(?:, )?([^, ]*)\\)"); |
| 26 | rgb = re.exec(color); |
| 27 | assert_approx_equals(Number(rgb[1]), red, 2.0); |
| 28 | assert_approx_equals(Number(rgb[2]), green, 2.0); |
| 29 | assert_approx_equals(Number(rgb[3]), blue, 2.0); |
| 30 | } |
| 31 | |
| 32 | function createSVGElement(type) { |
| 33 | return document.createElementNS("http://www.w3.org/2000/svg", type); |
nothing calls this directly
no test coverage detected