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

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: Patch for landing 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
« no previous file with comments | « Source/bindings/core/v8/ToV8.h ('k') | Source/bindings/modules/v8/ToV8ForModules.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/bindings/core/v8/ToV8.h ('k') | Source/bindings/modules/v8/ToV8ForModules.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698