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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/IDLTypesTest.cpp

Issue 2732093003: bindings: Add support for the record<K,V> WebIDL type. (Closed)
Patch Set: s/isolate->GetCurrentContext()/context/ Created 3 years, 9 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
Index: third_party/WebKit/Source/bindings/core/v8/IDLTypesTest.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/IDLTypesTest.cpp b/third_party/WebKit/Source/bindings/core/v8/IDLTypesTest.cpp
index 7115652f6e8be09b261294966d380ccfc63c00b6..a2ef413023179c9a51ed0421c33e721778b76196 100644
--- a/third_party/WebKit/Source/bindings/core/v8/IDLTypesTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/IDLTypesTest.cpp
@@ -117,6 +117,28 @@ static_assert(
HeapVector<DictionarySequenceOrDictionary>>::value,
"IDLSequence<union type> produces a HeapVector");
+static_assert(std::is_base_of<IDLBase, IDLRecord<IDLString, IDLShort>>::value,
+ "IDLRecord inherits from IDLBase");
+static_assert(std::is_base_of<IDLBase, IDLRecord<IDLString, Element>>::value,
+ "IDLRecord inherits from IDLBase");
+static_assert(std::is_same<IDLRecord<IDLByteString, IDLLong>::ImplType,
+ Vector<std::pair<String, int32_t>>>::value,
+ "IDLRecord<IDLByteString, IDLLong> produces a Vector");
+static_assert(
+ std::is_same<IDLRecord<IDLByteString, Element>::ImplType,
+ HeapVector<std::pair<String, Member<Element>>>>::value,
+ "IDLRecord<IDLByteString, GC-type>> produces a HeapVector with Member<>");
+static_assert(
+ std::is_same<IDLRecord<IDLUSVString, InternalDictionary>::ImplType,
+ HeapVector<std::pair<String, InternalDictionary>>>::value,
+ "IDLRecord<IDLUSVString, dictionary type> produces a HeapVector with no "
+ "Member<>");
+static_assert(
+ std::is_same<
+ IDLRecord<IDLString, DictionarySequenceOrDictionary>::ImplType,
+ HeapVector<std::pair<String, DictionarySequenceOrDictionary>>>::value,
+ "IDLRecord<IDLString, union type> produces a HeapVector with no Member<>");
+
} // namespace
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698