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..5931faedaaeeddbb4cb1470e98cd86ffb3cec171 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, int>> dictionary; |
+ dictionary.append(std::make_pair("one", 1)); |
+ dictionary.append(std::make_pair("two", 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; |