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

Side by Side Diff: LayoutTests/fast/forms/range/input-valueasnumber-range.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script> 4 <script src="../../js/resources/js-test-pre.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <p id="description"></p> 7 <p id="description"></p>
8 <div id="console"></div> 8 <div id="console"></div>
9 <script> 9 <script>
10 description('Tests for .valueAsNumber with &lt;input type=range>.'); 10 description('Tests for .valueAsNumber with &lt;input type=range>.');
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 shouldBe('setValueAsNumberAndGetValue(10)', '"10"'); 63 shouldBe('setValueAsNumberAndGetValue(10)', '"10"');
64 shouldBe('setValueAsNumberAndGetValue(01)', '"1"'); 64 shouldBe('setValueAsNumberAndGetValue(01)', '"1"');
65 shouldBe('setValueAsNumberAndGetValue(-0)', '"0"'); 65 shouldBe('setValueAsNumberAndGetValue(-0)', '"0"');
66 shouldBe('setValueAsNumberAndGetValue(-1.2)', '"0"'); 66 shouldBe('setValueAsNumberAndGetValue(-1.2)', '"0"');
67 shouldBe('setValueAsNumberAndGetValue(1.2e10)', '"100"'); 67 shouldBe('setValueAsNumberAndGetValue(1.2e10)', '"100"');
68 shouldBe('setValueAsNumberAndGetValue(1.2e-10)', '"0"'); 68 shouldBe('setValueAsNumberAndGetValue(1.2e-10)', '"0"');
69 shouldBe('setValueAsNumberAndGetValue(1.2345678901234567e+38)', '"100"'); 69 shouldBe('setValueAsNumberAndGetValue(1.2345678901234567e+38)', '"100"');
70 70
71 debug('Tests to set invalid values to valueAsNumber:'); 71 debug('Tests to set invalid values to valueAsNumber:');
72 shouldBe('setValueAsNumberAndGetValue(null)', '"0"'); 72 shouldBe('setValueAsNumberAndGetValue(null)', '"0"');
73 shouldThrow('setValueAsNumberAndGetValue("foo")', '"Error: NotSupportedError: DO M Exception 9"'); 73 shouldThrow('setValueAsNumberAndGetValue("foo")', '"NotSupportedError: The imple mentation did not support the requested type of object or operation."');
74 shouldThrow('setValueAsNumberAndGetValue(NaN)', '"Error: NotSupportedError: DOM Exception 9"'); 74 shouldThrow('setValueAsNumberAndGetValue(NaN)', '"NotSupportedError: The impleme ntation did not support the requested type of object or operation."');
75 shouldThrow('setValueAsNumberAndGetValue(Number.NaN)', '"Error: NotSupportedErro r: DOM Exception 9"'); 75 shouldThrow('setValueAsNumberAndGetValue(Number.NaN)', '"NotSupportedError: The implementation did not support the requested type of object or operation."');
76 shouldThrow('setValueAsNumberAndGetValue(Infinity)', '"Error: NotSupportedError: DOM Exception 9"'); 76 shouldThrow('setValueAsNumberAndGetValue(Infinity)', '"NotSupportedError: The im plementation did not support the requested type of object or operation."');
77 shouldThrow('setValueAsNumberAndGetValue(Number.POSITIVE_INFINITY)', '"Error: No tSupportedError: DOM Exception 9"'); 77 shouldThrow('setValueAsNumberAndGetValue(Number.POSITIVE_INFINITY)', '"NotSuppor tedError: The implementation did not support the requested type of object or ope ration."');
78 shouldThrow('setValueAsNumberAndGetValue(Number.NEGATIVE_INFINITY)', '"Error: No tSupportedError: DOM Exception 9"'); 78 shouldThrow('setValueAsNumberAndGetValue(Number.NEGATIVE_INFINITY)', '"NotSuppor tedError: The implementation did not support the requested type of object or ope ration."');
79 </script> 79 </script>
80 <script src="../../js/resources/js-test-post.js"></script> 80 <script src="../../js/resources/js-test-post.js"></script>
81 </body> 81 </body>
82 </html> 82 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698