OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.banners; | 5 package org.chromium.chrome.browser.banners; |
6 | 6 |
7 import android.content.pm.PackageInfo; | 7 import android.content.pm.PackageInfo; |
8 import android.os.HandlerThread; | 8 import android.os.HandlerThread; |
| 9 import android.support.test.filters.SmallTest; |
9 import android.test.InstrumentationTestCase; | 10 import android.test.InstrumentationTestCase; |
10 import android.test.mock.MockPackageManager; | 11 import android.test.mock.MockPackageManager; |
11 import android.test.suitebuilder.annotation.SmallTest; | |
12 | 12 |
13 import org.chromium.base.test.util.RetryOnFailure; | 13 import org.chromium.base.test.util.RetryOnFailure; |
14 import org.chromium.content.browser.test.util.Criteria; | 14 import org.chromium.content.browser.test.util.Criteria; |
15 import org.chromium.content.browser.test.util.CriteriaHelper; | 15 import org.chromium.content.browser.test.util.CriteriaHelper; |
16 | 16 |
17 import java.util.ArrayList; | 17 import java.util.ArrayList; |
18 import java.util.List; | 18 import java.util.List; |
19 | 19 |
20 /** | 20 /** |
21 * Tests the InstallerDelegate to make sure that it functions correctly and resp
onds to changes | 21 * Tests the InstallerDelegate to make sure that it functions correctly and resp
onds to changes |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 */ | 153 */ |
154 @SmallTest | 154 @SmallTest |
155 @RetryOnFailure | 155 @RetryOnFailure |
156 public void testRunnableRaceCondition() { | 156 public void testRunnableRaceCondition() { |
157 mPackageManager.isInstalled = true; | 157 mPackageManager.isInstalled = true; |
158 mTestDelegate.setTimingForTests(1, 5000); | 158 mTestDelegate.setTimingForTests(1, 5000); |
159 startMonitoring(); | 159 startMonitoring(); |
160 checkResults(true); | 160 checkResults(true); |
161 } | 161 } |
162 } | 162 } |
OLD | NEW |