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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/firstrun/FirstRunActivityTestObserver.java

Issue 2837343002: 🔍 Reland: Don't display the search engine until First Run completes (Closed)
Patch Set: <U+1F50D> Reland: Don't display the search engine until First Run completes Created 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/javatests/src/org/chromium/chrome/browser/firstrun/FirstRunActivityTestObserver.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/firstrun/FirstRunActivityTestObserver.java b/chrome/android/javatests/src/org/chromium/chrome/browser/firstrun/FirstRunActivityTestObserver.java
new file mode 100644
index 0000000000000000000000000000000000000000..67433e9d61cd88a21346f07329d787dba0ed1faa
--- /dev/null
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/firstrun/FirstRunActivityTestObserver.java
@@ -0,0 +1,46 @@
+// Copyright 2017 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.chrome.browser.firstrun;
+
+import android.os.Bundle;
+
+import org.chromium.base.test.util.CallbackHelper;
+
+/** Records when the FirstRunActivity has progressed through various states. */
+public class FirstRunActivityTestObserver implements FirstRunActivity.FirstRunActivityObserver {
+ public final CallbackHelper flowIsKnownCallback = new CallbackHelper();
+ public final CallbackHelper acceptTermsOfServiceCallback = new CallbackHelper();
+ public final CallbackHelper jumpToPageCallback = new CallbackHelper();
+ public final CallbackHelper updateCachedEngineCallback = new CallbackHelper();
+ public final CallbackHelper abortFirstRunExperienceCallback = new CallbackHelper();
+
+ public Bundle freProperties;
+
+ @Override
+ public void onFlowIsKnown(Bundle freProperties) {
+ this.freProperties = freProperties;
+ flowIsKnownCallback.notifyCalled();
+ }
+
+ @Override
+ public void onAcceptTermsOfService() {
+ acceptTermsOfServiceCallback.notifyCalled();
+ }
+
+ @Override
+ public void onJumpToPage(int position) {
+ jumpToPageCallback.notifyCalled();
+ }
+
+ @Override
+ public void onUpdateCachedEngineName() {
+ updateCachedEngineCallback.notifyCalled();
+ }
+
+ @Override
+ public void onAbortFirstRunExperience() {
+ abortFirstRunExperienceCallback.notifyCalled();
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698