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 * This test support class only tests Java layer and is not backed by any native
code. |
| 14 */ |
| 15 public class MockBlimpClientContextDelegate implements BlimpClientContextDelegat
e { |
| 16 int mRestartCalled = 0; |
| 17 int mStartUserSignInFlowCalled = 0; |
| 18 |
| 19 public void reset() { |
| 20 mRestartCalled = 0; |
| 21 mStartUserSignInFlowCalled = 0; |
| 22 } |
| 23 |
| 24 public int restartBrowserCalled() { |
| 25 return mRestartCalled; |
| 26 } |
| 27 |
| 28 public int startUserSignInFlowCalled() { |
| 29 return mStartUserSignInFlowCalled; |
| 30 } |
| 31 |
| 32 @Override |
| 33 public void restartBrowser() { |
| 34 mRestartCalled++; |
| 35 } |
| 36 |
| 37 @Override |
| 38 public void startUserSignInFlow(Context context) { |
| 39 mStartUserSignInFlowCalled++; |
| 40 } |
| 41 } |
OLD | NEW |