| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.download; | 5 package org.chromium.chrome.browser.download; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.support.test.filters.SmallTest; |
| 8 import android.test.InstrumentationTestCase; | 9 import android.test.InstrumentationTestCase; |
| 9 import android.test.suitebuilder.annotation.SmallTest; | |
| 10 | 10 |
| 11 import org.chromium.base.ThreadUtils; | 11 import org.chromium.base.ThreadUtils; |
| 12 import org.chromium.base.test.util.AdvancedMockContext; | 12 import org.chromium.base.test.util.AdvancedMockContext; |
| 13 import org.chromium.base.test.util.Feature; | 13 import org.chromium.base.test.util.Feature; |
| 14 import org.chromium.base.test.util.RetryOnFailure; | 14 import org.chromium.base.test.util.RetryOnFailure; |
| 15 | 15 |
| 16 import java.util.UUID; | 16 import java.util.UUID; |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * Tests of {@link SystemDownloadNotifier}. | 19 * Tests of {@link SystemDownloadNotifier}. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 DownloadInfo info2 = new DownloadInfo.Builder() | 99 DownloadInfo info2 = new DownloadInfo.Builder() |
| 100 .setDownloadGuid(UUID.randomUUID().toString()).build(); | 100 .setDownloadGuid(UUID.randomUUID().toString()).build(); |
| 101 mDownloadNotifier.notifyDownloadProgress(info2, 1L, true); | 101 mDownloadNotifier.notifyDownloadProgress(info2, 1L, true); |
| 102 | 102 |
| 103 mDownloadNotifier.notifyDownloadFailed(info); | 103 mDownloadNotifier.notifyDownloadFailed(info); |
| 104 assertTrue(mDownloadNotifier.mStarted); | 104 assertTrue(mDownloadNotifier.mStarted); |
| 105 mDownloadNotifier.notifyDownloadSuccessful(info2, 100L, true, false); | 105 mDownloadNotifier.notifyDownloadSuccessful(info2, 100L, true, false); |
| 106 assertFalse(mDownloadNotifier.mStarted); | 106 assertFalse(mDownloadNotifier.mStarted); |
| 107 } | 107 } |
| 108 } | 108 } |
| OLD | NEW |