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

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

Issue 1047993002: bindings: Add validation for enum Sequence or Array (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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: Source/core/testing/DictionaryTest.cpp
diff --git a/Source/core/testing/DictionaryTest.cpp b/Source/core/testing/DictionaryTest.cpp
index 19dac4dcea9d88f94946f59f9a61fc6c2f97310d..07d12516ebe4e60d8c595dedc3c77e21b306e0b8 100644
--- a/Source/core/testing/DictionaryTest.cpp
+++ b/Source/core/testing/DictionaryTest.cpp
@@ -51,6 +51,8 @@ void DictionaryTest::set(const InternalDictionary& testingDictionary)
m_enumMember = testingDictionary.enumMember();
m_enumMemberWithDefault = testingDictionary.enumMemberWithDefault();
m_enumOrNullMember = testingDictionary.enumOrNullMember();
+ if (testingDictionary.hasEnumArrayMember())
+ m_enumArrayMember = testingDictionary.enumArrayMember();
if (testingDictionary.hasElementMember())
m_elementMember = testingDictionary.elementMember();
if (testingDictionary.hasElementOrNullMember())
@@ -92,6 +94,8 @@ void DictionaryTest::get(InternalDictionary& result)
result.setEnumMember(m_enumMember);
result.setEnumMemberWithDefault(m_enumMemberWithDefault);
result.setEnumOrNullMember(m_enumOrNullMember);
+ if (m_enumArrayMember)
+ result.setEnumArrayMember(m_enumArrayMember.get());
if (m_elementMember)
result.setElementMember(m_elementMember);
if (m_elementOrNullMember)
@@ -136,6 +140,7 @@ void DictionaryTest::reset()
m_enumMember = String();
m_enumMemberWithDefault = String();
m_enumOrNullMember = String();
+ m_enumArrayMember = nullptr;
m_elementMember = nullptr;
m_elementOrNullMember = nullptr;
m_objectMember = ScriptValue();

Powered by Google App Engine
This is Rietveld 408576698