| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID | 5 #ifndef SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID |
| 6 #define SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID | 6 #define SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // Deletes the given |fake_server| (a FakeServer pointer created via | 31 // Deletes the given |fake_server| (a FakeServer pointer created via |
| 32 // CreateFakeServer). | 32 // CreateFakeServer). |
| 33 void DeleteFakeServer(JNIEnv* env, jobject obj, jlong fake_server); | 33 void DeleteFakeServer(JNIEnv* env, jobject obj, jlong fake_server); |
| 34 | 34 |
| 35 // Returns true if and only if |fake_server| contains |count| entities that | 35 // Returns true if and only if |fake_server| contains |count| entities that |
| 36 // match |model_type_string| and |name|. | 36 // match |model_type_string| and |name|. |
| 37 jboolean VerifyEntityCountByTypeAndName(JNIEnv* env, | 37 jboolean VerifyEntityCountByTypeAndName(JNIEnv* env, |
| 38 jobject obj, | 38 jobject obj, |
| 39 jlong fake_server, | 39 jlong fake_server, |
| 40 jlong count, | 40 jlong count, |
| 41 jstring model_type_string, | 41 jint model_type_int, |
| 42 jstring name); | 42 jstring name); |
| 43 | 43 |
| 44 // Returns true iff |fake_server| has exactly one window of sessions with | 44 // Returns true iff |fake_server| has exactly one window of sessions with |
| 45 // tabs matching |url_array|. The order of the array does not matter. | 45 // tabs matching |url_array|. The order of the array does not matter. |
| 46 jboolean VerifySessions(JNIEnv* env, | 46 jboolean VerifySessions(JNIEnv* env, |
| 47 jobject obj, | 47 jobject obj, |
| 48 jlong fake_server, | 48 jlong fake_server, |
| 49 jobjectArray url_array); | 49 jobjectArray url_array); |
| 50 | 50 |
| 51 // Return the entities for |model_type_string| on |fake_server|. | 51 // Return the entities for |model_type_string| on |fake_server|. |
| 52 base::android::ScopedJavaLocalRef<jobjectArray> GetSyncEntitiesByModelType( | 52 base::android::ScopedJavaLocalRef<jobjectArray> GetSyncEntitiesByModelType( |
| 53 JNIEnv* env, | 53 JNIEnv* env, |
| 54 jobject obj, | 54 jobject obj, |
| 55 jlong fake_server, | 55 jlong fake_server, |
| 56 jstring model_type_string); | 56 jint model_type_int); |
| 57 | 57 |
| 58 // Injects a UniqueClientEntity into |fake_server|. | 58 // Injects a UniqueClientEntity into |fake_server|. |
| 59 void InjectUniqueClientEntity(JNIEnv* env, | 59 void InjectUniqueClientEntity(JNIEnv* env, |
| 60 jobject obj, | 60 jobject obj, |
| 61 jlong fake_server, | 61 jlong fake_server, |
| 62 jstring name, | 62 jstring name, |
| 63 jbyteArray serialized_entity_specifics); | 63 jbyteArray serialized_entity_specifics); |
| 64 | 64 |
| 65 // Modifies the entity with |id| on |fake_server|. | 65 // Modifies the entity with |id| on |fake_server|. |
| 66 void ModifyEntitySpecifics(JNIEnv* env, | 66 void ModifyEntitySpecifics(JNIEnv* env, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 // Creates a bookmark entity. | 125 // Creates a bookmark entity. |
| 126 scoped_ptr<fake_server::FakeServerEntity> CreateBookmarkEntity( | 126 scoped_ptr<fake_server::FakeServerEntity> CreateBookmarkEntity( |
| 127 JNIEnv* env, | 127 JNIEnv* env, |
| 128 jstring title, | 128 jstring title, |
| 129 jstring url, | 129 jstring url, |
| 130 jstring parent_id); | 130 jstring parent_id); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 #endif // SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID | 133 #endif // SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID |
| OLD | NEW |