Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | |
|
tkent
2016/03/03 13:29:07
Please do not add |-005| to the file name. It's h
ramya.v
2016/03/04 06:31:45
Done.
| |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../resources/js-test.js"></script> | |
|
tkent
2016/03/03 13:29:07
I recommend to use testharness.js for new conforma
ramya.v
2016/03/04 06:31:45
Done.
| |
| 5 <style> | |
| 6 input:default { background: lime; } | |
| 7 option:default { background: lime; } | |
| 8 input { background: red; } | |
| 9 option { background: red; } | |
| 10 </style> | |
| 11 </head> | |
| 12 <body> | |
| 13 <p id="description"></p> | |
| 14 <form method="get"> | |
| 15 <input name="y" type="checkbox" checked /> | |
| 16 <input name="n" type="checkbox" /> | |
| 17 <input name="n" type="radio" /> | |
| 18 <input name="y" type ="radio" checked /> | |
|
tkent
2016/03/03 13:29:07
Add more cases:
- other input types with 'checke
ramya.v
2016/03/04 06:31:45
Done.
| |
| 19 <select> | |
| 20 <option name="n">1</option> | |
| 21 <option name="y" selected>2</option> | |
|
tkent
2016/03/03 13:29:08
Add another case:
- OPTION without selected attr
ramya.v
2016/03/04 06:31:45
Done.
| |
| 22 </select> | |
| 23 </form> | |
| 24 <div id="console"></div> | |
| 25 <script> | |
| 26 description("This test performs a check for the input types having checked attri bute and option elements having selected attributes to be considered for :defaul t CSS selector."); | |
| 27 | |
| 28 u = document.getElementsByName("n"); | |
| 29 for (i = 0; i < u.length; i++) | |
| 30 shouldBe("document.defaultView.getComputedStyle(u[i], null).getPropertyValue ('background-color')", "'rgb(255, 0, 0)'"); | |
|
tkent
2016/03/03 13:29:08
You can simply check |shouldBeFalse("u[i].matches(
ramya.v
2016/03/04 06:31:45
Done.
| |
| 31 v = document.getElementsByName("y"); | |
| 32 for (i = 0; i < v.length; i++) | |
| 33 shouldBe("document.defaultView.getComputedStyle(v[i], null).getPropertyValue ('background-color')", "'rgb(0, 255, 0)'"); | |
| 34 </script> | |
| 35 </body> | |
| 36 </html> | |
| OLD | NEW |