Index: Source/bindings/core/v8/ToV8Test.cpp |
diff --git a/Source/bindings/core/v8/ToV8Test.cpp b/Source/bindings/core/v8/ToV8Test.cpp |
index 30ed1b026d3b6a87142ebe8adcc78df8a883ac5e..23b2883d926ad278f7d8f1277426dfe7ccfb4ca2 100644 |
--- a/Source/bindings/core/v8/ToV8Test.cpp |
+++ b/Source/bindings/core/v8/ToV8Test.cpp |
@@ -227,6 +227,17 @@ TEST_F(ToV8Test, basicTypeVectors) |
TEST_TOV8("true,true,false", boolVector); |
} |
+TEST_F(ToV8Test, dictionaryVector) |
+{ |
+ Vector<std::pair<String, v8::Handle<v8::Value>>> dictionary; |
Yuki
2015/03/05 03:31:03
Optional: You can test with Vector<pair<String, in
|
+ dictionary.append(std::make_pair("one", v8::Number::New(m_scope.isolate(), 1))); |
+ dictionary.append(std::make_pair("two", v8::Number::New(m_scope.isolate(), 2))); |
+ TEST_TOV8("[object Object]", dictionary); |
+ v8::Handle<v8::Object> result = toV8(dictionary, m_scope.scriptState()->context()->Global(), m_scope.isolate())->ToObject(); |
+ EXPECT_EQ(1, result->Get(v8String(m_scope.isolate(), "one"))->NumberValue()); |
+ EXPECT_EQ(2, result->Get(v8String(m_scope.isolate(), "two"))->NumberValue()); |
+} |
+ |
TEST_F(ToV8Test, heapVector) |
{ |
HeapVector<Member<GarbageCollectedScriptWrappable>> v; |