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

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

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 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
« no previous file with comments | « base/android/jni_string.cc ('k') | base/android/jni_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 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_string.h"
6
7 #include "base/android/jni_android.h"
8 #include "base/android/scoped_java_ref.h"
9 #include "base/strings/utf_string_conversions.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11
12 namespace base {
13 namespace android {
14
15 TEST(JniString, BasicConversionsUTF8) {
16 const std::string kSimpleString = "SimpleTest8";
17 JNIEnv* env = AttachCurrentThread();
18 std::string result =
19 ConvertJavaStringToUTF8(ConvertUTF8ToJavaString(env, kSimpleString));
20 EXPECT_EQ(kSimpleString, result);
21 }
22
23 TEST(JniString, BasicConversionsUTF16) {
24 const string16 kSimpleString = UTF8ToUTF16("SimpleTest16");
25 JNIEnv* env = AttachCurrentThread();
26 string16 result =
27 ConvertJavaStringToUTF16(ConvertUTF16ToJavaString(env, kSimpleString));
28 EXPECT_EQ(kSimpleString, result);
29 }
30
31 } // namespace android
32 } // namespace base
OLDNEW
« no previous file with comments | « base/android/jni_string.cc ('k') | base/android/jni_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698