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

Unified Diff: LayoutTests/fast/dom/relList_on_anchor.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_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>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/relList_on_anchor-expected.txt » ('j') | LayoutTests/fast/dom/relList_on_link.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698