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

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

Issue 713683003: IDL: Support optional union type arguments with default values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add unit tests 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
Index: Source/core/testing/UnionTypesTest.cpp
diff --git a/Source/core/testing/UnionTypesTest.cpp b/Source/core/testing/UnionTypesTest.cpp
index d03e2985e6f82c2575e5dec4314e143f609aed86..5e34b96cf0ad2e699b7e18fd6d53499783c32285 100644
--- a/Source/core/testing/UnionTypesTest.cpp
+++ b/Source/core/testing/UnionTypesTest.cpp
@@ -40,7 +40,8 @@ void UnionTypesTest::setDoubleOrStringAttribute(const DoubleOrString& doubleOrSt
String UnionTypesTest::doubleOrStringArg(DoubleOrString& doubleOrString)
{
- ASSERT(!doubleOrString.isNull());
+ if (doubleOrString.isNull())
+ return "null is passed";
if (doubleOrString.isDouble())
return "double is passed: " + String::numberToStringECMAScript(doubleOrString.getAsDouble());
if (doubleOrString.isString())

Powered by Google App Engine
This is Rietveld 408576698