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

Unified Diff: Source/core/testing/UnionTypesTest.cpp

Issue 692993003: Named getter of HTMLAllCollection etc should be nullable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@union-nullable
Patch Set: Created 6 years, 1 month 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 | « Source/core/testing/UnionTypesTest.h ('k') | Source/core/testing/UnionTypesTest.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/UnionTypesTest.cpp
diff --git a/Source/core/testing/UnionTypesTest.cpp b/Source/core/testing/UnionTypesTest.cpp
index a5431760791ba06e9f6f521c7a18fc9e331f1806..f4fb56c6351a4fc575313b2de2315c28b7d3bb3f 100644
--- a/Source/core/testing/UnionTypesTest.cpp
+++ b/Source/core/testing/UnionTypesTest.cpp
@@ -76,4 +76,22 @@ String UnionTypesTest::doubleOrStringSequenceArg(Vector<DoubleOrString>& sequenc
return doubleOrStringArrayArg(sequence);
}
+String UnionTypesTest::nodeListOrElementArg(NodeListOrElement& nodeListOrElement)
+{
+ ASSERT(!nodeListOrElement.isNull());
+ return nodeListOrElementOrNullArg(nodeListOrElement);
+}
+
+String UnionTypesTest::nodeListOrElementOrNullArg(NodeListOrElement& nodeListOrElementOrNull)
+{
+ if (nodeListOrElementOrNull.isNull())
+ return "null or undefined is passed";
+ if (nodeListOrElementOrNull.isNodeList())
+ return "nodelist is passed";
+ if (nodeListOrElementOrNull.isElement())
+ return "element is passed";
+ ASSERT_NOT_REACHED();
+ return String();
+}
+
}
« no previous file with comments | « Source/core/testing/UnionTypesTest.h ('k') | Source/core/testing/UnionTypesTest.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698