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: changed script activation point 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..401e3bd1e26825d637984d7bd3c7de3b148fe75b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/forms/select/select-remove-option-single.html
@@ -0,0 +1,24 @@
+<title>Test for HTMLSelectElement.remove() on an Options object</title>
tkent 2016/09/28 23:13:26 Please add <!DOCTYPE html>
+
+<style type="text/css">
+ select {
tkent 2016/09/28 23:13:26 nit: Do not indent the whole content of <style>. i
+ min-width: 100px;
+ }
+</style>
+
+<select>
+ <option selected >hello</option>
tkent 2016/09/28 23:13:26 A space after "selected" is unnecessary.
+</select>
+
+<a herf="#">Remove option</a>
+
+<script>
+window.addEventListener('load', function() {
+ var removeLink = document.querySelector('a');
+ removeLink.addEventListener('click', () => {
+ document.querySelector('option').remove();
+ });
+ removeLink.click();
tkent 2016/09/28 23:13:26 I don't think we need to click the <a>. Why don't
+});
+</script>
+
tkent 2016/09/28 23:13:26 This line is unnecessary.

Powered by Google App Engine
This is Rietveld 408576698