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

Side by Side Diff: LayoutTests/fast/dom/setCustomValidity-null-undefined.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/setCustomValidity-null-undefined-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
(Empty)
1 <!DOCTYPE HTML>
2 <html>
philipj_slow 2015/07/10 08:49:45 You can omit <html>: https://www.chromium.org/blin
shiva.jm 2015/07/10 09:09:28 Done.
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
6
7 function test1(elementType) {
8 test(function() {
philipj_slow 2015/07/10 08:49:45 Should be indented.
shiva.jm 2015/07/10 09:09:28 Done.
9 var element = document.createElement(elementType);
10 element.setCustomValidity('');
11 assert_equals(element.validationMessage, '');
12 element.setCustomValidity(null);
13 assert_equals(element.validationMessage, 'null');
14 element.setCustomValidity(undefined);
15 assert_equals(element.validationMessage, 'undefined');
16 }, elementType + ' element test for setCustomValidity(), null and undefined argu ments.');
17 }
18
19 function test2(elementType) {
20 test(function() {
21 var element = document.createElement(elementType);
22 element.setCustomValidity('');
23 assert_equals(element.validationMessage, '');
24 element.setCustomValidity(null);
25 assert_equals(element.validationMessage, '');
26 element.setCustomValidity(undefined);
27 assert_equals(element.validationMessage, '');
28 }, elementType + ' element test for setCustomValidity(), null and undefined argu ments.');
29 }
30
31 test1('button');
32 test1('input');
33 test1('textarea');
34 test1('select');
35
36 test2('output');
37 test2('fieldset');
38 test2('object');
39 test2('keygen');
40 </script>
41 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/dom/setCustomValidity-null-undefined-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698