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

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
Index: Source/core/testing/DictionaryTest.cpp
diff --git a/Source/core/testing/DictionaryTest.cpp b/Source/core/testing/DictionaryTest.cpp
index d1af7d1f05ab6467cc324ee1d329b2ad38a99ee2..a320fa313901ade61d8688f8784bb1fe2c4faa0b 100644
--- a/Source/core/testing/DictionaryTest.cpp
+++ b/Source/core/testing/DictionaryTest.cpp
@@ -22,6 +22,8 @@ void DictionaryTest::set(const InternalDictionary& testingDictionary)
reset();
if (testingDictionary.hasLongMember())
m_longMember = testingDictionary.longMember();
+ if (testingDictionary.hasLongMemberWithClamp())
+ m_longMemberWithClamp = testingDictionary.longMemberWithClamp();
m_longMemberWithDefault = testingDictionary.longMemberWithDefault();
if (testingDictionary.hasLongOrNullMember())
m_longOrNullMember = testingDictionary.longOrNullMember();
@@ -54,6 +56,8 @@ void DictionaryTest::get(InternalDictionary& result)
{
if (m_longMember)
result.setLongMember(m_longMember.get());
+ if (m_longMemberWithClamp)
+ result.setLongMemberWithClamp(m_longMemberWithClamp.get());
result.setLongMemberWithDefault(m_longMemberWithDefault);
if (m_longOrNullMember)
result.setLongOrNullMember(m_longOrNullMember.get());
@@ -83,6 +87,7 @@ void DictionaryTest::get(InternalDictionary& result)
void DictionaryTest::reset()
{
m_longMember = Nullable<int>();
+ m_longMemberWithClamp = Nullable<int>();
m_longMemberWithDefault = -1; // This value should not be returned.
m_longOrNullMember = Nullable<int>();
m_longOrNullMemberWithDefault = Nullable<int>();

Powered by Google App Engine
This is Rietveld 408576698