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

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: Added to relList to anchor element and LayoutTest 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..5d872503e251e13ed9fad1d1cd11d6c9d3c7a38a
--- /dev/null
+++ b/LayoutTests/fast/dom/relList_on_anchor.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
Inactive 2014/07/24 15:36:40 We don't really need <html> / <head> or <body> her
+<head>
+<a rel="shortcut icon" href="../images/resources/1bit.ico"/>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body>
+<script>
+description("Checks relList attribute on anchor element");
+
+var anchorrellist = document.querySelectorAll('a[rel]');
Inactive 2014/07/24 15:36:40 Just add an id to your element and do a getElement
+var anchor = anchorrellist[0];
Inactive 2014/07/24 15:36:40 Could you add the following check? shouldBe("anch
+shouldBe("anchor.relList.contains('shortcut')", "true");
Inactive 2014/07/24 15:36:40 Use shouldBeTrue() and shouldBeFalse() as needed.
+shouldBe("anchor.relList.contains('icon')", "true");
Inactive 2014/07/24 15:36:40 It would be nice to check the indexed getters as w
+shouldBe("anchor.relList.length", "2");
+shouldBe("anchor.relList.contains('shortcut1')", "false");
+shouldNotThrow("anchor.rel = 'nofollow'");
+shouldBe("anchor.relList.length", "1");
+shouldBe("anchor.relList.contains('nofollow')", "true");
+shouldBe("anchor.relList.contains('shortcut')", "false");
+shouldBe("anchor.relList.contains('icon')", "false");
+</script>
Inactive 2014/07/24 15:36:40 Could you also try to remove the rel attribute and
+</body>
+</html>
« 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