OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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.blimp.core; |
| 6 |
| 7 import android.content.Context; |
| 8 |
| 9 import org.chromium.blimp_public.BlimpClientContextDelegate; |
| 10 |
| 11 /** |
| 12 * Mock {@link BlimpClientContextDelegate}, to test embedder delegate functions. |
| 13 */ |
| 14 public class MockBlimpClientContextDelegate implements BlimpClientContextDelegat
e { |
| 15 int mRestartCalled = 0; |
| 16 int mStartUserSignInFlowCalled = 0; |
| 17 |
| 18 public void reset() { |
| 19 mRestartCalled = 0; |
| 20 mStartUserSignInFlowCalled = 0; |
| 21 } |
| 22 |
| 23 public int restartBrowserCalled() { |
| 24 return mRestartCalled; |
| 25 } |
| 26 |
| 27 public int startUserSignInFlowCalled() { |
| 28 return mStartUserSignInFlowCalled; |
| 29 } |
| 30 |
| 31 @Override |
| 32 public void restartBrowser() { |
| 33 mRestartCalled++; |
| 34 } |
| 35 |
| 36 @Override |
| 37 public void startUserSignInFlow(Context context) { |
| 38 mStartUserSignInFlowCalled++; |
| 39 } |
| 40 } |
OLD | NEW |