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

Side by Side Diff: LayoutTests/fast/dom/set-custom-validity-with-too-few-arguments.html

Issue 1220833002: Make the setCustomValidity() error argument not nullable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/set-custom-validity-with-too-few-arguments-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script> 7 <script>
8 description('Test how setCustomValidity reacts to too few arguments.'); 8 description('Test how setCustomValidity reacts to too few arguments.');
9 9
10 var b = document.createElement('button'); 10 var b = document.createElement('button');
11 shouldThrow("b.setCustomValidity()"); 11 shouldThrow("b.setCustomValidity()");
12 shouldBeUndefined("b.setCustomValidity(null)");
philipj_slow 2015/07/06 12:36:18 shouldNotThrow() would be a more explicit way of s
shiva.jm 2015/07/07 10:33:42 Done.
13 shouldBeUndefined("b.setCustomValidity('')");
14 shouldBeUndefined("b.setCustomValidity(undefined)");
12 15
13 var fs = document.createElement('fieldset'); 16 var fs = document.createElement('fieldset');
14 shouldThrow("fs.setCustomValidity()"); 17 shouldThrow("fs.setCustomValidity()");
18 shouldBeUndefined("fs.setCustomValidity(null)");
19 shouldBeUndefined("fs.setCustomValidity('')");
20 shouldBeUndefined("fs.setCustomValidity(undefined)");
15 21
16 var i = document.createElement('input'); 22 var i = document.createElement('input');
17 shouldThrow("i.setCustomValidity()"); 23 shouldThrow("i.setCustomValidity()");
24 shouldBeUndefined("i.setCustomValidity(null)");
25 shouldBeUndefined("i.setCustomValidity('')");
26 shouldBeUndefined("i.setCustomValidity(undefined)");
18 27
19 var k = document.createElement('keygen'); 28 var k = document.createElement('keygen');
20 shouldThrow("k.setCustomValidity()"); 29 shouldThrow("k.setCustomValidity()");
30 shouldBeUndefined("k.setCustomValidity(null)");
31 shouldBeUndefined("k.setCustomValidity('')");
32 shouldBeUndefined("k.setCustomValidity(undefined)");
33
34 var ob = document.createElement('object');
35 shouldThrow("ob.setCustomValidity()");
36 shouldBeUndefined("ob.setCustomValidity(null)");
37 shouldBeUndefined("ob.setCustomValidity('')");
38 shouldBeUndefined("ob.setCustomValidity(undefined)");
39
40 var ou = document.createElement('output');
41 shouldThrow("ou.setCustomValidity()");
42 shouldBeUndefined("ou.setCustomValidity(null)");
43 shouldBeUndefined("ou.setCustomValidity('')");
44 shouldBeUndefined("ou.setCustomValidity(undefined)");
45
46 var s = document.createElement('select');
47 shouldThrow("s.setCustomValidity()");
48 shouldBeUndefined("s.setCustomValidity(null)");
49 shouldBeUndefined("s.setCustomValidity('')");
50 shouldBeUndefined("s.setCustomValidity(undefined)");
51
52 var ta = document.createElement('textarea');
53 shouldThrow("ta.setCustomValidity()");
54 shouldBeUndefined("ta.setCustomValidity(null)");
55 shouldBeUndefined("ta.setCustomValidity('')");
56 shouldBeUndefined("ta.setCustomValidity(undefined)");
21 </script> 57 </script>
22 </body> 58 </body>
23 </html> 59 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/set-custom-validity-with-too-few-arguments-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698