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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/NodeList-Iterable.html

Issue 2325173003: W3C auto test import CL. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/imported/wpt/html/dom/elements-embedded.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/NodeList-Iterable.html
diff --git a/third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/NodeList-Iterable.html b/third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/NodeList-Iterable.html
new file mode 100644
index 0000000000000000000000000000000000000000..e1349cd767bdc53f6e0aaf1a031d74d6600a29e5
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/imported/wpt/dom/nodes/NodeList-Iterable.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>NodeList Iterable Test</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+ <p id="1"></p>
+ <p id="2"></p>
+ <p id="3"></p>
+ <p id="4"></p>
+ <p id="5"></p>
+<script>
+ var paragraphs;
+ setup(function() {
+ paragraphs = document.querySelectorAll('p');
+ })
+ test(function() {
+ assert_true('length' in paragraphs);
+ }, 'NodeList has length method.');
+ test(function() {
+ assert_true('values' in paragraphs);
+ }, 'NodeList has values method.');
+ test(function() {
+ assert_true('entries' in paragraphs);
+ }, 'NodeList has entries method.');
+ test(function() {
+ assert_true('forEach' in paragraphs);
+ }, 'NodeList has forEach method.');
+ test(function() {
+ assert_true(Symbol.iterator in paragraphs);
+ }, 'NodeList has Symbol.iterator.');
+ test(function() {
+ var ids = "12345", idx=0;
+ for(var node of paragraphs){
+ assert_equals(node.getAttribute('id'), ids[idx++]);
+ }
+ }, 'NodeList is iterable via for-of loop.');
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/imported/wpt/html/dom/elements-embedded.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698