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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html

Issue 1854003004: Import web-platform-tests@5a8700479d98852455bee6117558897867eb278a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html
index f48e2975c25b1145a2456ce6e4822be61d4ebf3d..cb3b2ad2f5598ec3bdba5f22c4c166500b3ecf26 100644
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/infrastructure/common-dom-interfaces/collections/htmlallcollection.html
@@ -1,5 +1,5 @@
<!DOCTYPE HTML>
-<html>
+<html id="root">
<head>
<title>HTMLAllCollection Tests</title>
<link rel="author" title="Dan Druta" href="mailto:dan.druta@att.com"/>
@@ -11,8 +11,10 @@
</head>
<body id="tags">
<img src="../../../../images/green.png" name="picture">
+<a name="foo"></a>
+<a name="foo"></a>
<script>
-test(function(){ assert_equals(document.all.length,12)}, "Test for HTMLAllCollection size");
+test(function(){ assert_equals(document.all.length,14)}, "Test for HTMLAllCollection size");
test(function(){ assert_equals(document.all.item(0).tagName,"HTML")}, "Test lookup by index using ()");
@@ -29,6 +31,16 @@ test(function(){ assert_equals(document.all["picture"].nodeName,"IMG")}, "Test l
test(function(){ assert_equals(document.all.picture.nodeName,"IMG")}, "Test lookup IMG in collection using .");
test(function(){ assert_equals(document.all.tags.id,"tags")}, "Test lookup tags in collection using .");
+
+test(function() {
+ assert_equals(document.all["root"], document.documentElement);
+}, "Should find root element too");
+
+test(function() {
+ assert_equals(document.all["foo"].length, 2);
+}, "Should find both anchors and produce a list");
+
+test
</script>
<div id="log"></div>
</body>

Powered by Google App Engine
This is Rietveld 408576698