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

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

Issue 724733002: Support for [Clamp] and [EnforceRange] to IDL dictionary. (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/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 a987048c62cfe1d70da877ee207cd8f27145324a..c7bceebd233565a775a54dd6181385602835d9a6 100644
--- a/Source/core/testing/DictionaryTest.cpp
+++ b/Source/core/testing/DictionaryTest.cpp
@@ -23,6 +23,10 @@ void DictionaryTest::set(const InternalDictionary& testingDictionary)
reset();
if (testingDictionary.hasLongMember())
m_longMember = testingDictionary.longMember();
+ if (testingDictionary.hasLongMemberWithClamp())
+ m_longMemberWithClamp = testingDictionary.longMemberWithClamp();
+ if (testingDictionary.hasLongMemberWithEnforceRange())
+ m_longMemberWithEnforceRange = testingDictionary.longMemberWithEnforceRange();
m_longMemberWithDefault = testingDictionary.longMemberWithDefault();
if (testingDictionary.hasLongOrNullMember())
m_longOrNullMember = testingDictionary.longOrNullMember();
@@ -55,6 +59,10 @@ void DictionaryTest::get(InternalDictionary& result)
{
if (m_longMember)
result.setLongMember(m_longMember.get());
+ if (m_longMemberWithClamp)
+ result.setLongMemberWithClamp(m_longMemberWithClamp.get());
+ if (m_longMemberWithEnforceRange)
+ result.setLongMemberWithEnforceRange(m_longMemberWithEnforceRange.get());
result.setLongMemberWithDefault(m_longMemberWithDefault);
if (m_longOrNullMember)
result.setLongOrNullMember(m_longOrNullMember.get());
@@ -99,6 +107,8 @@ void DictionaryTest::getDerived(InternalDictionaryDerived& result)
void DictionaryTest::reset()
{
m_longMember = Nullable<int>();
+ m_longMemberWithClamp = Nullable<int>();
+ m_longMemberWithEnforceRange = Nullable<int>();
m_longMemberWithDefault = -1; // This value should not be returned.
m_longOrNullMember = Nullable<int>();
m_longOrNullMemberWithDefault = Nullable<int>();
« 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