| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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.snackbar; | 5 package org.chromium.chrome.browser.snackbar; |
| 6 | 6 |
| 7 import android.test.suitebuilder.annotation.MediumTest; | 7 import android.support.test.filters.MediumTest; |
| 8 import android.test.suitebuilder.annotation.SmallTest; | 8 import android.support.test.filters.SmallTest; |
| 9 | 9 |
| 10 import org.chromium.base.ThreadUtils; | 10 import org.chromium.base.ThreadUtils; |
| 11 import org.chromium.base.test.util.RetryOnFailure; | 11 import org.chromium.base.test.util.RetryOnFailure; |
| 12 import org.chromium.chrome.browser.snackbar.SnackbarManager.SnackbarController; | 12 import org.chromium.chrome.browser.snackbar.SnackbarManager.SnackbarController; |
| 13 import org.chromium.chrome.test.ChromeTabbedActivityTestBase; | 13 import org.chromium.chrome.test.ChromeTabbedActivityTestBase; |
| 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 /** | 17 /** |
| 18 * Tests for {@link SnackbarManager}. | 18 * Tests for {@link SnackbarManager}. |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 } | 157 } |
| 158 }); | 158 }); |
| 159 CriteriaHelper.pollUiThread(new Criteria("Snackbar did not time out") { | 159 CriteriaHelper.pollUiThread(new Criteria("Snackbar did not time out") { |
| 160 @Override | 160 @Override |
| 161 public boolean isSatisfied() { | 161 public boolean isSatisfied() { |
| 162 return !mManager.isShowing() && mDismissed; | 162 return !mManager.isShowing() && mDismissed; |
| 163 } | 163 } |
| 164 }); | 164 }); |
| 165 } | 165 } |
| 166 } | 166 } |
| OLD | NEW |