Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: LayoutTests/fast/css/resources/CSSPrimitiveValue-exceptions.js

Issue 128043003: Improve core/css exception messages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()");
« no previous file with comments | « LayoutTests/fast/css/getFloatValueForUnit-expected.txt ('k') | LayoutTests/fast/dom/Window/custom-constructors-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698