Chromium Code Reviews| Index: LayoutTests/fast/dom/relList_on_anchor.html |
| diff --git a/LayoutTests/fast/dom/relList_on_anchor.html b/LayoutTests/fast/dom/relList_on_anchor.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..90e83fa77ffb3e323b2a4000cf88f89e3386ae57 |
| --- /dev/null |
| +++ b/LayoutTests/fast/dom/relList_on_anchor.html |
| @@ -0,0 +1,21 @@ |
| +<a id="anchorId" rel="shortcut icon" href="../images/resources/1bit.ico"/> |
|
Inactive
2014/07/25 12:55:51
Please add back the DOCTYPE.
|
| +<script src="../../resources/js-test.js"></script> |
| +<script> |
| +description("Checks relList attribute on anchor element"); |
| + |
| +var anchor = document.getElementById('anchorId'); |
| +shouldBe("anchor.relList.__proto__", "DOMTokenList.prototype"); |
| +shouldBeTrue("anchor.relList.contains('shortcut')"); |
|
Inactive
2014/07/25 12:55:51
The issue with contains() is that you don't verify
|
| +shouldBeTrue("anchor.relList.contains('icon')"); |
| +shouldBe("anchor.relList.length", "2"); |
| +shouldBeFalse("anchor.relList.contains('shortcut1')"); |
| +shouldNotThrow("anchor.rel = 'nofollow'"); |
| +shouldBe("anchor.relList.length", "1"); |
| +shouldBeTrue("anchor.relList.contains('nofollow')"); |
| +shouldBeFalse("anchor.relList.contains('shortcut')"); |
| +shouldBeFalse("anchor.relList.contains('icon')"); |
| +shouldNotThrow("anchor.removeAttribute('rel')"); |
| +shouldBeEmptyString("anchor.rel"); |
| +shouldBe("anchor.relList.length", "0"); |
| +shouldBeUndefined("anchor.relList[0]"); |
| +</script> |