OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 package org.chromium.chrome.browser.firstrun; |
| 6 |
| 7 import org.chromium.base.test.util.CallbackHelper; |
| 8 |
| 9 /** Records when the FirstRunActivity has progressed through various states. */ |
| 10 public class FirstRunActivityTestObserver implements FirstRunActivity.FirstRunAc
tivityObserver { |
| 11 public final CallbackHelper flowIsKnownCallback = new CallbackHelper(); |
| 12 public final CallbackHelper acceptTermsOfServiceCallback = new CallbackHelpe
r(); |
| 13 public final CallbackHelper jumpToPageCallback = new CallbackHelper(); |
| 14 public final CallbackHelper updateCachedEngineCallback = new CallbackHelper(
); |
| 15 public final CallbackHelper abortFirstRunExperienceCallback = new CallbackHe
lper(); |
| 16 |
| 17 @Override |
| 18 public void onFlowIsKnown() { |
| 19 flowIsKnownCallback.notifyCalled(); |
| 20 } |
| 21 |
| 22 @Override |
| 23 public void onAcceptTermsOfService() { |
| 24 acceptTermsOfServiceCallback.notifyCalled(); |
| 25 } |
| 26 |
| 27 @Override |
| 28 public void onJumpToPage(int position) { |
| 29 jumpToPageCallback.notifyCalled(); |
| 30 } |
| 31 |
| 32 @Override |
| 33 public void onUpdateCachedEngineName() { |
| 34 updateCachedEngineCallback.notifyCalled(); |
| 35 } |
| 36 |
| 37 @Override |
| 38 public void onAbortFirstRunExperience() { |
| 39 abortFirstRunExperienceCallback.notifyCalled(); |
| 40 } |
| 41 } |
OLD | NEW |