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

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

Issue 429853002: IDL: Add build target for IDL dictionary impl generation in core (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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/core.gypi ('k') | Source/core/testing/DictionaryTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/DictionaryTest.h
diff --git a/Source/core/testing/DictionaryTest.h b/Source/core/testing/DictionaryTest.h
new file mode 100644
index 0000000000000000000000000000000000000000..860cddd387ec7e04c2efe7d63079b9e4477184c5
--- /dev/null
+++ b/Source/core/testing/DictionaryTest.h
@@ -0,0 +1,49 @@
+// 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.
+
+#ifndef DictionaryTest_h
+#define DictionaryTest_h
+
+#include "bindings/core/v8/Nullable.h"
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "platform/heap/Handle.h"
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+class InternalDictionary;
+
+class DictionaryTest : public GarbageCollectedFinalized<DictionaryTest>, public ScriptWrappable {
+public:
+ static DictionaryTest* create()
+ {
+ return new DictionaryTest();
+ }
+ virtual ~DictionaryTest();
+
+ // Stores all members into corresponding fields
+ void set(const InternalDictionary*);
+ // Creates a TestDictionary instnace from fields and returns it
+ InternalDictionary* get();
+
+ void trace(Visitor*);
+
+private:
+ DictionaryTest();
+
+ void reset();
+
+ // The reason to use Nullable<T> is convenience; we use Nullable<T> here to
+ // record whether the member field is set or not. |stringMember| isn't
+ // wrapped with Nullable because |stringMember| has a non-null default value
+ Nullable<unsigned> m_longMember;
+ String m_stringMember;
+ Nullable<bool> m_booleanOrNullMember;
+ Nullable<double> m_doubleOrNullMember;
+ Nullable<Vector<String> > m_stringSequenceMember;
+};
+
+} // namespace blink
+
+#endif // DictionaryTest_h
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/testing/DictionaryTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698