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

Side by Side Diff: components/gcm_driver/instance_id/instance_id_test_utils_android.cc

Issue 1829023002: Add fake for InstanceIDWithSubtype.java, in order to re-use unit test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@iid2jni
Patch Set: Address 2nd round review comments Created 4 years, 8 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
OLDNEW
(Empty)
1 // Copyright 2016 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 "components/gcm_driver/instance_id/instance_id_test_utils_android.h"
6
7 #include "base/android/jni_android.h"
8 #include "jni/FakeInstanceIDWithSubtype_jni.h"
9
10 using base::android::AttachCurrentThread;
11
12 namespace instance_id {
13
14 // static
15 bool InstanceIDTestUtilsAndroid::RegisterJni(JNIEnv* env) {
16 return RegisterNativesImpl(env);
17 }
18
19 // static
20 void InstanceIDTestUtilsAndroid::ClearDataAndSetUseFakeForTesting(
21 bool use_fake) {
22 JNIEnv* env = AttachCurrentThread();
23 Java_FakeInstanceIDWithSubtype_clearDataAndSetEnabled(env, use_fake);
24 }
25
26 } // namespace instance_id
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698