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

Side by Side Diff: base/android/jni_map_unittest.cc

Issue 12255042: [Android] Introduce a Java wrapper for TemplateUrlService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/android/jni_map.h"
6
7 #include "base/android/jni_android.h"
8 #include "base/android/scoped_java_ref.h"
9 #include "base/utf_string_conversions.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11
12 namespace base {
13 namespace android {
14
15 TEST(JniMap, BasicConversions) {
16 std::map<std::string, string16> test_map;
17 test_map["foo"] = UTF8ToUTF16("bar");
18 test_map["key"] = UTF8ToUTF16("value");
19 JNIEnv* env = AttachCurrentThread();
20 std::map<std::string, string16> result =
21 ConvertJavaMapToMap(env, ConvertMapToJavaMap(env, test_map).obj());
22 EXPECT_EQ(test_map, result);
23 }
24
25 } // namespace android
26 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698