Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <a id="anchorId" rel="shortcut icon" href="../images/resources/1bit.ico"/> | |
|
Inactive
2014/07/25 12:55:51
Please add back the DOCTYPE.
| |
| 2 <script src="../../resources/js-test.js"></script> | |
| 3 <script> | |
| 4 description("Checks relList attribute on anchor element"); | |
| 5 | |
| 6 var anchor = document.getElementById('anchorId'); | |
| 7 shouldBe("anchor.relList.__proto__", "DOMTokenList.prototype"); | |
| 8 shouldBeTrue("anchor.relList.contains('shortcut')"); | |
|
Inactive
2014/07/25 12:55:51
The issue with contains() is that you don't verify
| |
| 9 shouldBeTrue("anchor.relList.contains('icon')"); | |
| 10 shouldBe("anchor.relList.length", "2"); | |
| 11 shouldBeFalse("anchor.relList.contains('shortcut1')"); | |
| 12 shouldNotThrow("anchor.rel = 'nofollow'"); | |
| 13 shouldBe("anchor.relList.length", "1"); | |
| 14 shouldBeTrue("anchor.relList.contains('nofollow')"); | |
| 15 shouldBeFalse("anchor.relList.contains('shortcut')"); | |
| 16 shouldBeFalse("anchor.relList.contains('icon')"); | |
| 17 shouldNotThrow("anchor.removeAttribute('rel')"); | |
| 18 shouldBeEmptyString("anchor.rel"); | |
| 19 shouldBe("anchor.relList.length", "0"); | |
| 20 shouldBeUndefined("anchor.relList[0]"); | |
| 21 </script> | |
| OLD | NEW |