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

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/select/select-remove-option-single.html

Issue 2372913002: fixed <select> element isn't updated after its single option removing. (Closed)
Patch Set: add layout test Created 4 years, 3 months 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698