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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-label-element/label-attributes.html

Issue 1453993002: update-w3c-deps import using blink cc6d84edb87e89c363ab48dac8a983213b9dc02c: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Skip imported/web-platform-tests/html/webappapis/scripting/events/onerroreventhandler.html Created 5 years, 1 month 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/imported/web-platform-tests/html/semantics/forms/the-label-element/label-attributes.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-label-element/label-attributes.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-label-element/label-attributes.html
index fea872afa5949df37519ac8a376088d150b215af..55ca76759cf7711d76f0b0e8aeb67934c307dee9 100644
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-label-element/label-attributes.html
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-label-element/label-attributes.html
@@ -53,6 +53,7 @@
"A label element not in a document should not label an element in a document.");
document.body.appendChild(label);
assert_equals(label.control, document.getElementById("test1"));
+ label.remove();
}, "A label element not in a document can not label any element in the document.");
test(function () {
@@ -63,6 +64,7 @@
document.getElementById("lbl1").insertBefore(input, document.getElementById("test2"));
assert_equals(document.getElementById("lbl1").control, input,
"The first labelable descendant of a label element in tree order should be its labeled control.");
+ input.remove();
}, "The labeled control for a label element that has no 'for' attribute is the first labelable element which is a descendant of that label element.");
test(function () {
@@ -95,12 +97,19 @@
document.getElementById("fm").insertBefore(newLabel, document.getElementById("lbl0"));
assert_array_equals(document.getElementById("test7").labels, [newLabel, document.getElementById("lbl5"), document.getElementById("lbl6")],
"The labels for a form control should be returned in tree order.");
+ newLabel.remove();
}, "A form control has multiple labels.");
test(function () {
+ var labels = document.getElementById("test3").labels;
+ assert_true(labels instanceof NodeList, "A form control's 'labels' property should be an instance of a NodeList.");
+ assert_equals(labels.length, 1, "The form control has an ancestor with no explicit associated label, and is the first labelable descendant.");
+ }, "A form control has an implicit label.");
+
+ test(function () {
var labels = document.getElementById("test4").labels;
assert_true(labels instanceof NodeList, "A form control's 'labels' property should be an instance of a NodeList.");
- assert_equals(labels.length, 0, "The number of labels should be 0 if the associated form control isn't referenced by any <label>.");
+ assert_equals(labels.length, 0, "The form control has an ancestor with no explicit associated label, but is *not* the first labelable descendant");
}, "A form control has no label 1.");
test(function () {

Powered by Google App Engine
This is Rietveld 408576698