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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-option-element/option-element-constructor.html

Issue 2891723002: Do not create child node for Option constructor with no arguments/undefined text (Closed)
Patch Set: Rebased and added IsEmpty check Created 3 years, 7 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/external/wpt/html/semantics/forms/the-option-element/option-element-constructor.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-option-element/option-element-constructor.html b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-option-element/option-element-constructor.html
index 51fc3e4402ea2b44af6aae1e3e65dc7b8278041b..8e586de6987a19f53fb1fa077b3a5c16815dac5d 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-option-element/option-element-constructor.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-option-element/option-element-constructor.html
@@ -91,6 +91,16 @@
}, "Option constructor treats undefined text and value correctly");
test(() => {
+ const option = new Option("", "");
+
+ assert_false(option.hasChildNodes());
+ assert_true(option.hasAttribute("value"));
+
+ assert_equals(option.textContent, "");
+ assert_equals(option.value, "");
+ }, "Option constructor treats empty text and value correctly");
+
+ test(() => {
const option = new Option("text", "value", 0, "");
assert_false(option.hasAttribute("selected"));
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/the-option-element/option-element-constructor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698