| Index: base/android/jni_map_unittest.cc
|
| diff --git a/base/android/jni_map_unittest.cc b/base/android/jni_map_unittest.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..188926dfa9dfca0a2253f9f02f04fed51590e3a9
|
| --- /dev/null
|
| +++ b/base/android/jni_map_unittest.cc
|
| @@ -0,0 +1,26 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "base/android/jni_map.h"
|
| +
|
| +#include "base/android/jni_android.h"
|
| +#include "base/android/scoped_java_ref.h"
|
| +#include "base/utf_string_conversions.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +namespace base {
|
| +namespace android {
|
| +
|
| +TEST(JniMap, BasicConversions) {
|
| + std::map<std::string, string16> test_map;
|
| + test_map["foo"] = UTF8ToUTF16("bar");
|
| + test_map["key"] = UTF8ToUTF16("value");
|
| + JNIEnv* env = AttachCurrentThread();
|
| + std::map<std::string, string16> result =
|
| + ConvertJavaMapToMap(env, ConvertMapToJavaMap(env, test_map).obj());
|
| + EXPECT_EQ(test_map, result);
|
| +}
|
| +
|
| +} // namespace android
|
| +} // namespace base
|
|
|