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

Unified Diff: LayoutTests/fast/dom/relList_on_link.html

Issue 400763002: Adding relList attr to link and anchor element Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: modified as per review comment Created 6 years, 5 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: LayoutTests/fast/dom/relList_on_link.html
diff --git a/LayoutTests/fast/dom/relList_on_link.html b/LayoutTests/fast/dom/relList_on_link.html
new file mode 100644
index 0000000000000000000000000000000000000000..4b7563a8877e7887631b483dcf4bbea5b4b62e3d
--- /dev/null
+++ b/LayoutTests/fast/dom/relList_on_link.html
@@ -0,0 +1,21 @@
+<link id="linkId" 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 link element");
+
+var link = document.getElementById('linkId');
+shouldBe("link.relList.__proto__", "DOMTokenList.prototype");
+shouldBeTrue("link.relList.contains('shortcut')");
Inactive 2014/07/25 12:55:51 Same comment about using indexed getter.
+shouldBeTrue("link.relList.contains('icon')");
+shouldBe("link.relList.length", "2");
+shouldBeFalse("link.relList.contains('shortcut1')");
+shouldNotThrow("link.rel = 'nofollow'");
+shouldBe("link.relList.length", "1");
+shouldBeTrue("link.relList.contains('nofollow')");
+shouldBeFalse("link.relList.contains('shortcut')");
+shouldBeFalse("link.relList.contains('icon')");
+shouldNotThrow("link.removeAttribute('rel')");
+shouldBeEmptyString("link.rel");
+shouldBe("link.relList.length", "0");
+shouldBeUndefined("link.relList[0]");
+</script>

Powered by Google App Engine
This is Rietveld 408576698