Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/forms/select/select-remove-option-single.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/forms/select/select-remove-option-single.html b/third_party/WebKit/LayoutTests/fast/forms/select/select-remove-option-single.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..092f1977718ea036e6244c5f52d906e402396776 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/forms/select/select-remove-option-single.html |
| @@ -0,0 +1,45 @@ |
| +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| +<html> |
|
zino
2016/09/28 16:10:04
According to layout test style guide line[1], <htm
|
| +<head> |
| + |
| +<script> |
|
zino
2016/09/28 16:10:04
Please move this script block below <a></a>.
|
| + |
| +function load() { |
|
zino
2016/09/28 16:10:04
You can simplify this script as follows:
var rem
|
| + var select_ = document.getElementById("a"); |
| + select_.addEventListener('click', function() { |
| + var option = document.getElementById("o"); |
| + option.remove(); |
| + }); |
| + select_.click(); |
| + |
| +} |
| +window.onload = load; |
| + |
| +</script> |
| +<style type="text/css"> |
| + #s { |
| + min-width: 100px; |
| + } |
| +</style> |
| +<title>Test for HTMLSelectElement.remove() on an Options object</title> |
| + |
| +</head> |
| + |
| +<body> |
| +<form> |
|
zino
2016/09/28 16:10:04
This looks unnecessary.
|
| +<select id="s"> |
| + <option id="o" selected >hello</option> |
| +</select> |
| +<a id="a" herf="#" onload="test()">Remove option</a> |
|
zino
2016/09/28 16:10:04
Let's remove 'onload' attribute as well.
|
| +</form> |
| +<script> |
|
zino
2016/09/28 16:10:04
This looks unnecessary.
|
| +</script> |
| +</body> |
| + |
| +</html> |
| + |
| + |
| +<script> |
| +if (window.testRunner) |
|
zino
2016/09/28 16:10:04
You could do ref test instead of this pixel test.
|
| + window.testRunner.dumpAsTextWithPixelResults(); |
| +</script> |