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..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> |