@SmallTest public void testValidSessionOtherWarmup() { mClientManager.recordUidHasCalledWarmup(mUid + 1); mClientManager.newSession(mCallback, mUid, null); assertEquals( ClientManager.SESSION_NO_WARMUP_ALREADY_CALLED, mClientManager.getWarmupState(mSession)); }
@SmallTest public void testValidSessionWarmupSeveralCalls() { mClientManager.recordUidHasCalledWarmup(mUid); mClientManager.newSession(mCallback, mUid, null); assertEquals(ClientManager.SESSION_WARMUP, mClientManager.getWarmupState(mSession)); ICustomTabsCallback callback = new CustomTabsTestUtils.DummyCallback(); IBinder session = callback.asBinder(); mClientManager.newSession(callback, mUid, null); assertEquals(ClientManager.SESSION_WARMUP, mClientManager.getWarmupState(session)); }
@SmallTest public void testValidSessionWarmup() { mClientManager.recordUidHasCalledWarmup(mUid); mClientManager.newSession(mCallback, mUid, null); assertEquals(ClientManager.SESSION_WARMUP, mClientManager.getWarmupState(mSession)); }
@SmallTest public void testInvalidSessionWarmup() { mClientManager.recordUidHasCalledWarmup(mUid); assertEquals(ClientManager.NO_SESSION_WARMUP, mClientManager.getWarmupState(mSession)); }