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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/validity-property.html

Issue 2536993002: Remove support for the keygen tag (Closed)
Patch Set: Rebased Created 4 years 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <title>ValidityState minimal test case</title> 3 <title>ValidityState minimal test case</title>
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 <fieldset name="victim"> 7 <fieldset name="victim">
8 <select name="victim"></select> 8 <select name="victim"></select>
9 <input name="victim"/> 9 <input name="victim"/>
10 <textarea name="victim"></textarea> 10 <textarea name="victim"></textarea>
11 <button name="victim"></button> 11 <button name="victim"></button>
12 <output name="victim"></output> 12 <output name="victim"></output>
13 <object name="victim"></object> 13 <object name="victim"></object>
14 <keygen name="victim"></keygen>
15 </fieldset> 14 </fieldset>
16 15
17 <script> 16 <script>
18 description('Each form control in this document exposes a validity attribute tha t returns a live instance of ValidityState.'); 17 description('Each form control in this document exposes a validity attribute tha t returns a live instance of ValidityState.');
19 18
20 function countAttr(o) { 19 function countAttr(o) {
21 var a = 0; 20 var a = 0;
22 for (pisell in o) 21 for (pisell in o)
23 a++; 22 a++;
24 return a; 23 return a;
25 } 24 }
26 25
27 var controls = document.getElementsByName("victim"); 26 var controls = document.getElementsByName("victim");
28 for (var i = 0; i < controls.length; ++i) { 27 for (var i = 0; i < controls.length; ++i) {
29 debug('===> Tests for ' + controls[i].tagName); 28 debug('===> Tests for ' + controls[i].tagName);
30 shouldBeTrue('"validity" in controls[i]'); 29 shouldBeTrue('"validity" in controls[i]');
31 var validity1, validity2; 30 var validity1, validity2;
32 shouldBeTrue('validity1 = controls[i].validity; validity1 instanceof Validit yState'); 31 shouldBeTrue('validity1 = controls[i].validity; validity1 instanceof Validit yState');
33 shouldBeTrue('validity2 = controls[i].validity; validity1 === validity2'); 32 shouldBeTrue('validity2 = controls[i].validity; validity1 === validity2');
34 shouldBe('countAttr(controls[i].validity)', '11'); 33 shouldBe('countAttr(controls[i].validity)', '11');
35 } 34 }
36 35
37 shouldThrow('new ValidityState()', '"TypeError: Illegal constructor"'); 36 shouldThrow('new ValidityState()', '"TypeError: Illegal constructor"');
38 </script> 37 </script>
39 38
40 </body> 39 </body>
41 </html> 40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698