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

Unified Diff: sync/test/fake_server/android/fake_server_helper_android.h

Issue 457883002: Use Sync FakeServer in Android tests via custom APK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/test/DEPS ('k') | sync/test/fake_server/android/fake_server_helper_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/fake_server/android/fake_server_helper_android.h
diff --git a/sync/test/fake_server/android/fake_server_helper_android.h b/sync/test/fake_server/android/fake_server_helper_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..24e1d9e182312388080bba777e4eb3cc3477e746
--- /dev/null
+++ b/sync/test/fake_server/android/fake_server_helper_android.h
@@ -0,0 +1,37 @@
+// Copyright 2014 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.
+
+#ifndef SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID
+#define SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID
+
+#include <jni.h>
+
+#include "base/basictypes.h"
+
+// Helper for utilizing native FakeServer infrastructure in Android tests.
+class FakeServerHelperAndroid {
+ public:
+ // Registers the native methods.
+ static bool Register(JNIEnv* env);
+
+ // Creates a FakeServerHelperAndroid.
+ FakeServerHelperAndroid(JNIEnv* env, jobject obj);
+
+ // Factory method for creating a native FakeServer object. The caller assumes
+ // ownership.
+ jlong CreateFakeServer(JNIEnv* env, jobject obj);
+
+ // Factory method for creating a native NetworkResources object. The caller
+ // assumes ownership.
+ jlong CreateNetworkResources(JNIEnv* env, jobject obj, jlong fake_server);
+
+ // Deletes the given |fake_server| (a FakeServer pointer created via
+ // CreateFakeServer).
+ void DeleteFakeServer(JNIEnv* env, jobject obj, jlong fake_server);
+
+ private:
+ virtual ~FakeServerHelperAndroid();
+};
+
+#endif // SYNC_TEST_FAKE_SERVER_ANDROID_FAKE_SERVER_HELPER_ANDROID
« no previous file with comments | « sync/test/DEPS ('k') | sync/test/fake_server/android/fake_server_helper_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698