Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
| 2 <html> | |
|
zino
2016/09/28 16:10:04
According to layout test style guide line[1], <htm
| |
| 3 <head> | |
| 4 | |
| 5 <script> | |
|
zino
2016/09/28 16:10:04
Please move this script block below <a></a>.
| |
| 6 | |
| 7 function load() { | |
|
zino
2016/09/28 16:10:04
You can simplify this script as follows:
var rem
| |
| 8 var select_ = document.getElementById("a"); | |
| 9 select_.addEventListener('click', function() { | |
| 10 var option = document.getElementById("o"); | |
| 11 option.remove(); | |
| 12 }); | |
| 13 select_.click(); | |
| 14 | |
| 15 } | |
| 16 window.onload = load; | |
| 17 | |
| 18 </script> | |
| 19 <style type="text/css"> | |
| 20 #s { | |
| 21 min-width: 100px; | |
| 22 } | |
| 23 </style> | |
| 24 <title>Test for HTMLSelectElement.remove() on an Options object</title> | |
| 25 | |
| 26 </head> | |
| 27 | |
| 28 <body> | |
| 29 <form> | |
|
zino
2016/09/28 16:10:04
This looks unnecessary.
| |
| 30 <select id="s"> | |
| 31 <option id="o" selected >hello</option> | |
| 32 </select> | |
| 33 <a id="a" herf="#" onload="test()">Remove option</a> | |
|
zino
2016/09/28 16:10:04
Let's remove 'onload' attribute as well.
| |
| 34 </form> | |
| 35 <script> | |
|
zino
2016/09/28 16:10:04
This looks unnecessary.
| |
| 36 </script> | |
| 37 </body> | |
| 38 | |
| 39 </html> | |
| 40 | |
| 41 | |
| 42 <script> | |
| 43 if (window.testRunner) | |
|
zino
2016/09/28 16:10:04
You could do ref test instead of this pixel test.
| |
| 44 window.testRunner.dumpAsTextWithPixelResults(); | |
| 45 </script> | |
| OLD | NEW |