| Index: LayoutTests/fast/css/resources/CSSPrimitiveValue-exceptions.js
|
| diff --git a/LayoutTests/fast/css/resources/CSSPrimitiveValue-exceptions.js b/LayoutTests/fast/css/resources/CSSPrimitiveValue-exceptions.js
|
| index c4189fac1bbeec3792d4a2c100dede4eb20d241a..b831fb5e28d4a5f39a2c495c625c3142ec7ff8a1 100644
|
| --- a/LayoutTests/fast/css/resources/CSSPrimitiveValue-exceptions.js
|
| +++ b/LayoutTests/fast/css/resources/CSSPrimitiveValue-exceptions.js
|
| @@ -7,29 +7,27 @@ div.style.content = "counter(dummy, square)";
|
| div.style.clip = "rect(0, 0, 1, 1)";
|
| div.style.color = "rgb(0, 0, 0)";
|
|
|
| -var invalidAccessError = "InvalidAccessError: A parameter or an operation was not supported by the underlying object.";
|
| -
|
| // Test passing invalid unit to getFloatValue
|
| -shouldThrow("div.style.getPropertyCSSValue('width').getFloatValue(CSSPrimitiveValue.CSS_UNKNOWN)", "invalidAccessError");
|
| -shouldThrow("div.style.getPropertyCSSValue('width').getFloatValue(CSSPrimitiveValue.CSS_STRING)", "invalidAccessError");
|
| +shouldThrow("div.style.getPropertyCSSValue('width').getFloatValue(CSSPrimitiveValue.CSS_UNKNOWN)");
|
| +shouldThrow("div.style.getPropertyCSSValue('width').getFloatValue(CSSPrimitiveValue.CSS_STRING)");
|
|
|
| // Test invalid unit conversions in getFloatValue
|
| -shouldThrow("div.style.getPropertyCSSValue('width').getFloatValue(CSSPrimitiveValue.CSS_HZ)", "invalidAccessError");
|
| -shouldThrow("div.style.getPropertyCSSValue('width').getFloatValue(CSSPrimitiveValue.CSS_S)", "invalidAccessError");
|
| -shouldThrow("div.style.getPropertyCSSValue('width').getFloatValue(CSSPrimitiveValue.CSS_RAD)", "invalidAccessError");
|
| -shouldThrow("div.style.getPropertyCSSValue('width').getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)", "invalidAccessError");
|
| -shouldThrow("div.style.getPropertyCSSValue('height').getFloatValue(CSSPrimitiveValue.CSS_PX)", "invalidAccessError");
|
| -shouldThrow("div.style.getPropertyCSSValue('height').getFloatValue(CSSPrimitiveValue.CSS_DEG)", "invalidAccessError");
|
| +shouldThrow("div.style.getPropertyCSSValue('width').getFloatValue(CSSPrimitiveValue.CSS_HZ)");
|
| +shouldThrow("div.style.getPropertyCSSValue('width').getFloatValue(CSSPrimitiveValue.CSS_S)");
|
| +shouldThrow("div.style.getPropertyCSSValue('width').getFloatValue(CSSPrimitiveValue.CSS_RAD)");
|
| +shouldThrow("div.style.getPropertyCSSValue('width').getFloatValue(CSSPrimitiveValue.CSS_PERCENTAGE)");
|
| +shouldThrow("div.style.getPropertyCSSValue('height').getFloatValue(CSSPrimitiveValue.CSS_PX)");
|
| +shouldThrow("div.style.getPropertyCSSValue('height').getFloatValue(CSSPrimitiveValue.CSS_DEG)");
|
|
|
| // Test calling get*Value for CSSPrimitiveValue of the wrong type
|
| shouldBe("div.style.getPropertyCSSValue('clip').primitiveType", "CSSPrimitiveValue.CSS_RECT");
|
| -shouldThrow("div.style.getPropertyCSSValue('clip').getFloatValue(CSSPrimitiveValue.CSS_PX)", "invalidAccessError");
|
| -shouldThrow("div.style.getPropertyCSSValue('clip').getStringValue()", "invalidAccessError");
|
| -shouldThrow("div.style.getPropertyCSSValue('clip').getCounterValue()", "invalidAccessError");
|
| -shouldThrow("div.style.getPropertyCSSValue('clip').getRGBColorValue()", "invalidAccessError");
|
| +shouldThrow("div.style.getPropertyCSSValue('clip').getFloatValue(CSSPrimitiveValue.CSS_PX)");
|
| +shouldThrow("div.style.getPropertyCSSValue('clip').getStringValue()");
|
| +shouldThrow("div.style.getPropertyCSSValue('clip').getCounterValue()");
|
| +shouldThrow("div.style.getPropertyCSSValue('clip').getRGBColorValue()");
|
|
|
| shouldBe("div.style.getPropertyCSSValue('color').primitiveType", "CSSPrimitiveValue.CSS_RGBCOLOR");
|
| -shouldThrow("div.style.getPropertyCSSValue('color').getFloatValue(CSSPrimitiveValue.CSS_PX)", "invalidAccessError");
|
| -shouldThrow("div.style.getPropertyCSSValue('color').getStringValue()", "invalidAccessError");
|
| -shouldThrow("div.style.getPropertyCSSValue('color').getCounterValue()", "invalidAccessError");
|
| -shouldThrow("div.style.getPropertyCSSValue('color').getRectValue()", "invalidAccessError");
|
| +shouldThrow("div.style.getPropertyCSSValue('color').getFloatValue(CSSPrimitiveValue.CSS_PX)");
|
| +shouldThrow("div.style.getPropertyCSSValue('color').getStringValue()");
|
| +shouldThrow("div.style.getPropertyCSSValue('color').getCounterValue()");
|
| +shouldThrow("div.style.getPropertyCSSValue('color').getRectValue()");
|
|
|