Tests if the class and className IDL attributes do the same
@@ -8,23 +10,23 @@
Tests if the class and className IDL attributes do the same
diff --git a/html/the-elements-of-html/html_for_alias.html b/html/the-elements-of-html/html_for_alias.html
index 75b358418d9a54..dc1852ef07b962 100644
--- a/html/the-elements-of-html/html_for_alias.html
+++ b/html/the-elements-of-html/html_for_alias.html
@@ -1,6 +1,9 @@
for alias for htmlFor
+
+
+
Tests if the for and htmlFor IDL attributes on <label> and <output> and do the same
@@ -9,26 +12,26 @@
Tests if the for and htmlFor IDL attributes on <label> and <output&
const elements = [document.createElement("label"), document.createElement("output")]
test(function() {
for (const elem of elements) {
- assert_equals(elem.for, "", "for must reflect \"for\"");
- assert_equals(elem.htmlFor, "", "htmlFor must reflect \"for\"");
+ assert_true(elem.for == "", "for must reflect \"for\"");
+ assert_true(elem.htmlFor == "", "htmlFor must reflect \"for\"");
elem.setAttribute("for", "test1");
- assert_equals(elem.for, "test1", "for must reflect changes made to \"for\"");
- assert_equals(elem.htmlFor, "test1", "htmlFor must reflect changes made to \"for\"");
+ assert_true(elem.for == "test1", "for must reflect changes made to \"for\"");
+ assert_true(elem.htmlFor == "test1", "htmlFor must reflect changes made to \"for\"");
}
});
test(function() {
for (const elem of elements) {
elem.htmlFor = "test2";
- assert_equals(elem.for, "test2", "setting htmlFor must be reflected by for");
- assert_equals(elem.htmlFor, "test2", "setting htmlFor must be reflected by htmlFor");
+ assert_true(elem.for == "test2", "setting htmlFor must be reflected by for");
+ assert_true(elem.htmlFor == "test2", "setting htmlFor must be reflected by htmlFor");
}
});
test(function() {
for (const elem of elements) {
elem.for = "test3";
- assert_equals(elem.for, "test3", "setting for must be reflected by for");
- assert_equals(elem.htmlFor, "test3", "setting for must be reflected by htmlFor");
+ assert_true(elem.for == "test3", "setting for must be reflected by for");
+ assert_true(elem.htmlFor == "test3", "setting for must be reflected by htmlFor");
}
});