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

Unified Diff: LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html

Issue 373043004: IDL: Treat undefined as missing for optional arguments with defaults (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased 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/NodeIterator/NodeIterator-basic.html
diff --git a/LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html b/LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html
index 735a54a023f0bed1b292c58a900f3a9b5c2baf89..d2e3fd3bd689e5385d1222be28c34c7583994ec3 100644
--- a/LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html
+++ b/LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html
@@ -18,10 +18,8 @@ function createSampleDOM()
return div;
}
-test(function ()
+function check_iterator(iterator, root)
{
- var root = createSampleDOM();
- var iterator = document.createNodeIterator(root);
assert_equals(iterator.toString(), '[object NodeIterator]');
assert_equals(iterator.root, root);
assert_equals(iterator.referenceNode, root);
@@ -36,7 +34,21 @@ test(function ()
assert_idl_attribute(iterator, 'nextNode');
assert_idl_attribute(iterator, 'previousNode');
assert_idl_attribute(iterator, 'detach');
-}, 'Construct a NodeIterator by document.createNodeIterator().');
+}
+
+test(function ()
+{
+ var root = createSampleDOM();
+ var iterator = document.createNodeIterator(root);
+ check_iterator(iterator, root);
+}, 'Construct a NodeIterator by document.createNodeIterator(root).');
+
+test(function ()
+{
+ var root = createSampleDOM();
+ var iterator = document.createNodeIterator(root, undefined, undefined);
+ check_iterator(iterator, root);
+}, 'Construct a NodeIterator by document.createNodeIterator(root, undefined, undefined).');
test(function ()
{

Powered by Google App Engine
This is Rietveld 408576698