Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetObserverTest.java

Issue 2753773006: [Home] Move bottom sheet classes to widget/bottomsheet (Closed)
Patch Set: Fix bottom_sheet_bottom_nav.xml Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698