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

Side by Side Diff: LayoutTests/fast/forms/month/input-valueasdate.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('Test HTMLInputElement::valueAsDate binding.'); 10 description('Test HTMLInputElement::valueAsDate binding.');
11 11
12 var input = document.createElement('input'); 12 var input = document.createElement('input');
13 var invalidStateError = 'Error: InvalidStateError: DOM Exception 11'; 13 var invalidStateError = 'InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable.';
14 14
15 debug('Unsuppported type:'); 15 debug('Unsuppported type:');
16 input.type = 'text'; 16 input.type = 'text';
17 shouldBe('input.valueAsDate', 'null'); 17 shouldBe('input.valueAsDate', 'null');
18 shouldThrow('input.valueAsDate = date', 'invalidStateError'); 18 shouldThrow('input.valueAsDate = date', 'invalidStateError');
19 19
20 debug(''); 20 debug('');
21 debug('Supported type:'); 21 debug('Supported type:');
22 input.type = 'month'; 22 input.type = 'month';
23 input.value = '2009-12'; 23 input.value = '2009-12';
(...skipping 19 matching lines...) Expand all
43 input.value = '1970-01'; 43 input.value = '1970-01';
44 input.valueAsDate = undefined; 44 input.valueAsDate = undefined;
45 shouldBe('input.value', '""'); 45 shouldBe('input.value', '""');
46 input.value = '1970-01'; 46 input.value = '1970-01';
47 input.valueAsDate = document; 47 input.valueAsDate = document;
48 shouldBe('input.value', '""'); 48 shouldBe('input.value', '""');
49 </script> 49 </script>
50 <script src="../../js/resources/js-test-post.js"></script> 50 <script src="../../js/resources/js-test-post.js"></script>
51 </body> 51 </body>
52 </html> 52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698