| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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.widget; | 5 package org.chromium.chrome.browser.widget.bottomsheet; |
| 6 | 6 |
| 7 import android.support.test.filters.MediumTest; | 7 import android.support.test.filters.MediumTest; |
| 8 | 8 |
| 9 import org.chromium.base.test.util.CallbackHelper; | 9 import org.chromium.base.test.util.CallbackHelper; |
| 10 import org.chromium.chrome.browser.util.MathUtils; | 10 import org.chromium.chrome.browser.util.MathUtils; |
| 11 import org.chromium.chrome.test.BottomSheetTestCaseBase; | 11 import org.chromium.chrome.test.BottomSheetTestCaseBase; |
| 12 | 12 |
| 13 import java.util.concurrent.TimeoutException; | 13 import java.util.concurrent.TimeoutException; |
| 14 | 14 |
| 15 /** This class tests the functionality of the {@link BottomSheetObserver}. */ | 15 /** This class tests the functionality of the {@link BottomSheetObserver}. */ |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 callbackHelper.waitForCallback(callbackCount, 1); | 219 callbackHelper.waitForCallback(callbackCount, 1); |
| 220 assertEquals(0.5f, mObserver.mLastPeekToHalfValue, MathUtils.EPSILON); | 220 assertEquals(0.5f, mObserver.mLastPeekToHalfValue, MathUtils.EPSILON); |
| 221 | 221 |
| 222 // At the half state the event should send 1. | 222 // At the half state the event should send 1. |
| 223 callbackCount = callbackHelper.getCallCount(); | 223 callbackCount = callbackHelper.getCallCount(); |
| 224 setSheetOffsetFromBottom(halfHeight); | 224 setSheetOffsetFromBottom(halfHeight); |
| 225 callbackHelper.waitForCallback(callbackCount, 1); | 225 callbackHelper.waitForCallback(callbackCount, 1); |
| 226 assertEquals(1f, mObserver.mLastPeekToHalfValue, MathUtils.EPSILON); | 226 assertEquals(1f, mObserver.mLastPeekToHalfValue, MathUtils.EPSILON); |
| 227 } | 227 } |
| 228 } | 228 } |
| OLD | NEW |