OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../../resources/testharness.js"></script> |
| 5 <script src="../../resources/testharnessreport.js"></script> |
| 6 </head> |
| 7 <body> |
| 8 <form method="get"> |
| 9 <input name="y" type="checkbox" checked /> |
| 10 <input name="y" type ="radio" checked /> |
| 11 <input id="c1" name="y" type="checkbox" /> |
| 12 <input id="r1" name="y" type="radio" /> |
| 13 <input id="c2" name="n" type="checkbox" /> |
| 14 <input id="r2" name="n" type="radio" /> |
| 15 <input name="n" type="checkbox" /> |
| 16 <input name="n" type="radio" /> |
| 17 <input name="n" type="text" checked /> |
| 18 <input name="n" type="password" checked /> |
| 19 <input name="n" type="button" checked /> |
| 20 <input name="n" type="file" checked /> |
| 21 <input name="n" type="reset" checked /> |
| 22 <input name="n" type="search" checked /> |
| 23 <input name="n" type="email" checked /> |
| 24 <input name="n" type="url" checked /> |
| 25 <input name="n" type="tel" checked /> |
| 26 <input name="n" type="number" checked /> |
| 27 <input name="n" type="range" checked /> |
| 28 <input name="n" type="date" checked /> |
| 29 <input name="n" type="month" checked /> |
| 30 <input name="n" type="week" checked /> |
| 31 <input name="n" type="time" checked /> |
| 32 <input name="n" type="date-time" checked /> |
| 33 <input name="n" type="datetime-local" checked /> |
| 34 <input name="n" type="color" checked /> |
| 35 </form> |
| 36 <script> |
| 37 test(function() { |
| 38 document.getElementById("c1").defaultChecked = true; |
| 39 document.getElementById("r1").defaultChecked = true; |
| 40 document.getElementById("c2").checked = true; |
| 41 document.getElementById("r2").checked = true; |
| 42 u = document.getElementsByName("n"); |
| 43 for (i = 0; i < u.length; i++) |
| 44 assert_false(u[i].matches(":default")); |
| 45 v = document.getElementsByName("y"); |
| 46 for (i = 0; i < v.length; i++) |
| 47 assert_true(v[i].matches(":default")); |
| 48 }, "This test performs a check for the input types which are checkable having ch
ecked attribute to be considered for :default CSS selector."); |
| 49 </script> |
| 50 </body> |
| 51 </html> |
OLD | NEW |