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

Unified Diff: LayoutTests/fast/forms/number/number-valueasnumber.html

Issue 16818023: DOMException toString is not correct (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 6 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/forms/number/number-valueasnumber.html
diff --git a/LayoutTests/fast/forms/number/number-valueasnumber.html b/LayoutTests/fast/forms/number/number-valueasnumber.html
index 922f176674bc1702413c4b9f86b30f4fb01fd1f8..bebca7f63b710a51fd4623da1819b57401afad51 100644
--- a/LayoutTests/fast/forms/number/number-valueasnumber.html
+++ b/LayoutTests/fast/forms/number/number-valueasnumber.html
@@ -62,18 +62,18 @@ shouldBe('setValueAsNumberAndGetValue(1.2e10)', '"12000000000"');
shouldBe('setValueAsNumberAndGetValue(1.2e-10)', '"1.2e-10"');
shouldBe('setValueAsNumberAndGetValue(1.2345678901234567e+38)', '"1.2345678901234567e+38"');
shouldBe('setValueAsNumberAndGetValue("-3.40282346e+38")', '"-3.40282346e+38"');
-shouldThrow('setValueAsNumberAndGetValue("-3.40282348e+38")', '"Error: InvalidStateError: DOM Exception 11"');
+shouldThrow('setValueAsNumberAndGetValue("-3.40282348e+38")', '"InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable."');
shouldBe('setValueAsNumberAndGetValue("3.40282346e+38")', '"3.40282346e+38"');
-shouldThrow('setValueAsNumberAndGetValue("3.40282348e+38")', '"Error: InvalidStateError: DOM Exception 11"');
+shouldThrow('setValueAsNumberAndGetValue("3.40282348e+38")', '"InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable."');
debug('Tests to set invalid values to valueAsNumber:');
shouldBe('setValueAsNumberAndGetValue(null)', '"0"');
-shouldThrow('setValueAsNumberAndGetValue("foo")', '"Error: NotSupportedError: DOM Exception 9"');
-shouldThrow('setValueAsNumberAndGetValue(NaN)', '"Error: NotSupportedError: DOM Exception 9"');
-shouldThrow('setValueAsNumberAndGetValue(Number.NaN)', '"Error: NotSupportedError: DOM Exception 9"');
-shouldThrow('setValueAsNumberAndGetValue(Infinity)', '"Error: NotSupportedError: DOM Exception 9"');
-shouldThrow('setValueAsNumberAndGetValue(Number.POSITIVE_INFINITY)', '"Error: NotSupportedError: DOM Exception 9"');
-shouldThrow('setValueAsNumberAndGetValue(Number.NEGATIVE_INFINITY)', '"Error: NotSupportedError: DOM Exception 9"');
+shouldThrow('setValueAsNumberAndGetValue("foo")', '"NotSupportedError: The implementation did not support the requested type of object or operation."');
+shouldThrow('setValueAsNumberAndGetValue(NaN)', '"NotSupportedError: The implementation did not support the requested type of object or operation."');
+shouldThrow('setValueAsNumberAndGetValue(Number.NaN)', '"NotSupportedError: The implementation did not support the requested type of object or operation."');
+shouldThrow('setValueAsNumberAndGetValue(Infinity)', '"NotSupportedError: The implementation did not support the requested type of object or operation."');
+shouldThrow('setValueAsNumberAndGetValue(Number.POSITIVE_INFINITY)', '"NotSupportedError: The implementation did not support the requested type of object or operation."');
+shouldThrow('setValueAsNumberAndGetValue(Number.NEGATIVE_INFINITY)', '"NotSupportedError: The implementation did not support the requested type of object or operation."');
</script>
<script src="../../../fast/js/resources/js-test-post.js"></script>
</body>

Powered by Google App Engine
This is Rietveld 408576698