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

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

Issue 1221743002: Teach Blink's IDL parser to handle defaulted sequences of strings. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@pinned
Patch Set: Add a test to LayoutTests/fast/dom/idl-dictionary-unittest.html Created 5 years, 6 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 | « Source/core/testing/DictionaryTest.h ('k') | Source/core/testing/InternalDictionary.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/DictionaryTest.cpp
diff --git a/Source/core/testing/DictionaryTest.cpp b/Source/core/testing/DictionaryTest.cpp
index 7f49ecbf6b00c3d97b60185666beb76eb05dc316..57ff0452d155d07ece134543013699a44d3f4f94 100644
--- a/Source/core/testing/DictionaryTest.cpp
+++ b/Source/core/testing/DictionaryTest.cpp
@@ -47,6 +47,7 @@ void DictionaryTest::set(const InternalDictionary& testingDictionary)
m_usvStringMember = testingDictionary.usvStringMember();
if (testingDictionary.hasStringSequenceMember())
m_stringSequenceMember = testingDictionary.stringSequenceMember();
+ m_stringSequenceMemberWithDefault = testingDictionary.stringSequenceMemberWithDefault();
if (testingDictionary.hasStringSequenceOrNullMember())
m_stringSequenceOrNullMember = testingDictionary.stringSequenceOrNullMember();
m_enumMember = testingDictionary.enumMember();
@@ -90,6 +91,7 @@ void DictionaryTest::get(InternalDictionary& result)
result.setUsvStringMember(m_usvStringMember);
if (m_stringSequenceMember)
result.setStringSequenceMember(m_stringSequenceMember.get());
+ result.setStringSequenceMemberWithDefault(m_stringSequenceMemberWithDefault);
if (m_stringSequenceOrNullMember)
result.setStringSequenceOrNullMember(m_stringSequenceOrNullMember.get());
result.setEnumMember(m_enumMember);
@@ -140,6 +142,7 @@ void DictionaryTest::reset()
m_stringMember = String();
m_stringMemberWithDefault = String("Should not be returned");
m_stringSequenceMember = nullptr;
+ m_stringSequenceMemberWithDefault.fill("Should not be returned", 1);
m_stringSequenceOrNullMember = nullptr;
m_enumMember = String();
m_enumMemberWithDefault = String();
« no previous file with comments | « Source/core/testing/DictionaryTest.h ('k') | Source/core/testing/InternalDictionary.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698