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

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

Issue 740453004: IDL: Basic dictionary inheritance support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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/DictionaryTest.h ('k') | Source/core/testing/DictionaryTest.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 d1af7d1f05ab6467cc324ee1d329b2ad38a99ee2..a987048c62cfe1d70da877ee207cd8f27145324a 100644
--- a/Source/core/testing/DictionaryTest.cpp
+++ b/Source/core/testing/DictionaryTest.cpp
@@ -6,6 +6,7 @@
#include "DictionaryTest.h"
#include "core/testing/InternalDictionary.h"
+#include "core/testing/InternalDictionaryDerived.h"
namespace blink {
@@ -80,6 +81,21 @@ void DictionaryTest::get(InternalDictionary& result)
result.setObjectOrNullMemberWithDefault(m_objectOrNullMemberWithDefault);
}
+void DictionaryTest::setDerived(const InternalDictionaryDerived& derived)
+{
+ set(derived);
+ if (derived.hasDerivedStringMember())
+ m_derivedStringMember = derived.derivedStringMember();
+ m_derivedStringMemberWithDefault = derived.derivedStringMemberWithDefault();
+}
+
+void DictionaryTest::getDerived(InternalDictionaryDerived& result)
+{
+ get(result);
+ result.setDerivedStringMember(m_derivedStringMember);
+ result.setDerivedStringMemberWithDefault(m_derivedStringMemberWithDefault);
+}
+
void DictionaryTest::reset()
{
m_longMember = Nullable<int>();
@@ -99,6 +115,8 @@ void DictionaryTest::reset()
m_elementOrNullMember = nullptr;
m_objectMember = ScriptValue();
m_objectOrNullMemberWithDefault = ScriptValue();
+ m_derivedStringMember = String();
+ m_derivedStringMemberWithDefault = String();
}
void DictionaryTest::trace(Visitor* visitor)
« no previous file with comments | « Source/core/testing/DictionaryTest.h ('k') | Source/core/testing/DictionaryTest.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698