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

Unified Diff: components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridgeTest.java

Issue 1462953004: Unit tests for importing prefs from the Java side implemented (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unit test check if prefs are actually empty after calling ClearJavaFirstRunPrefs() function Created 5 years, 1 month 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
Index: components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridgeTest.java
diff --git a/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridgeTest.java b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridgeTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..2e75f92701c44dd5a79ed194f68803cb40e09161
--- /dev/null
+++ b/components/variations/android/java/src/org/chromium/components/variations/firstrun/VariationsSeedBridgeTest.java
@@ -0,0 +1,20 @@
+// Copyright 2015 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.
+
+package org.chromium.components.variations.firstrun;
+
+import android.content.Context;
+
+import org.chromium.base.annotations.CalledByNative;
+
+/**
+ * VariationsSeedBridgeTest class provides methods to handle test data during unit tests run.
+ */
+public class VariationsSeedBridgeTest extends VariationsSeedBridge {
+ @CalledByNative
+ private static void setTestData(Context context) {
+ setVariationsFirstRunSeed(context, new String("raw_seed_data_test").getBytes(),
+ "seed_signature_test", "seed_country_code_test", "seed_response_date_test", true);
Alexei Svitkine (slow) 2015/11/20 16:28:28 Instead having a whole new Java class for all of t
Alexander Agulenko 2015/11/20 17:33:31 Acknowledged.
Alexander Agulenko 2015/11/20 19:02:08 Done.
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698