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

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/forms/ValidityState-customError.html » ('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 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script>
5
6 function test1(elementType) {
7 test(function() {
8 var element = document.createElement(elementType);
9 element.setCustomValidity('');
10 assert_equals(element.validationMessage, '');
11 element.setCustomValidity(null);
12 assert_equals(element.validationMessage, 'null');
13 element.setCustomValidity(undefined);
14 assert_equals(element.validationMessage, 'undefined');
15 }, elementType + ' element test for setCustomValidity(), null and undefined arguments.');
16 }
17
18 function test2(elementType) {
19 test(function() {
20 var element = document.createElement(elementType);
21 element.setCustomValidity('');
22 assert_equals(element.validationMessage, '');
23 element.setCustomValidity(null);
24 assert_equals(element.validationMessage, '');
25 element.setCustomValidity(undefined);
26 assert_equals(element.validationMessage, '');
27 }, elementType + ' element test for setCustomValidity(), null and undefined arguments.');
28 }
29
30 test1('button');
31 test1('input');
32 test1('textarea');
33 test1('select');
34
35 test2('output');
36 test2('fieldset');
37 test2('object');
38 test2('keygen');
39 </script>
40 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/forms/ValidityState-customError.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698