Chromium Code Reviews| Index: chrome/android/junit/src/org/chromium/chrome/browser/TestableChromeApplication.java |
| diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/TestableChromeApplication.java b/chrome/android/junit/src/org/chromium/chrome/browser/TestableChromeApplication.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a5d3fa0ba1ef0f04d7d5fec912a99cfc79780b1d |
| --- /dev/null |
| +++ b/chrome/android/junit/src/org/chromium/chrome/browser/TestableChromeApplication.java |
| @@ -0,0 +1,17 @@ |
| +// Copyright 2016 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; |
| + |
| +/** |
| + * To make ChromeApplication unit testable, it can't execite ContentApplication's onTerminate, |
| + * which interacts with its (in tests nonexistant) TracingController. |
|
Ted C
2016/10/04 20:19:23
This actually seems like a bug in ContentApplicati
kraush
2016/10/04 21:36:36
Using BaseChromiumApplication actually fixes this
|
| + * Compared to a Mock, this class can be used within an @Config |
| + */ |
| +public class TestableChromeApplication extends ChromeApplication { |
| + @Override |
| + public void onTerminate() { |
| + // Do nothing |
| + } |
| +} |