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

Unified Diff: Source/bindings/core/v8/ToV8Test.cpp

Issue 972153002: [bindings] Remove custom binding usage in SQLResultSetRowList. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@test
Patch Set: Review comments addressed! Created 5 years, 10 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: 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;

Powered by Google App Engine
This is Rietveld 408576698