Index: Source/core/testing/DictionaryTest.cpp |
diff --git a/Source/core/testing/DictionaryTest.cpp b/Source/core/testing/DictionaryTest.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..17ccdbfabf24bf7ae957fe4f921a8de05939ddd3 |
--- /dev/null |
+++ b/Source/core/testing/DictionaryTest.cpp |
@@ -0,0 +1,48 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "config.h" |
+#include "DictionaryTest.h" |
+ |
+#include "core/testing/TestingDictionary.h" |
+ |
+namespace blink { |
+ |
+DictionaryTest::DictionaryTest() |
+{ |
+ ScriptWrappable::init(this); |
+} |
+ |
+DictionaryTest::~DictionaryTest() |
+{ |
+} |
+ |
+void DictionaryTest::set(const TestingDictionary* testingDictionary) |
+{ |
+ if (testingDictionary->hasLongMember()) |
+ m_longMember = testingDictionary->longMember(); |
+ m_stringMember = testingDictionary->stringMember(); |
+ if (testingDictionary->hasBooleanOrNullMember()) |
+ m_booleanOrNullMember = testingDictionary->booleanOrNullMember(); |
+ if (testingDictionary->hasStringSequenceMember()) |
+ m_stringSequenceMember = testingDictionary->stringSequenceMember(); |
+} |
+ |
+TestingDictionary* DictionaryTest::get() |
+{ |
+ TestingDictionary* result = TestingDictionary::create(); |
+ if (m_longMember) |
+ result->setLongMember(m_longMember.get()); |
+ result->setStringMember(m_stringMember); |
+ if (m_booleanOrNullMember) |
+ result->setBooleanOrNullMember(m_booleanOrNullMember); |
+ result->setStringSequenceMember(m_stringSequenceMember); |
+ return result; |
+} |
+ |
+void DictionaryTest::trace(Visitor* visitor) |
+{ |
+} |
+ |
+} |