@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 testValidSessionOtherWarmup() { mClientManager.recordUidHasCalledWarmup(mUid + 1); mClientManager.newSession(mCallback, mUid, null); assertEquals( ClientManager.SESSION_NO_WARMUP_ALREADY_CALLED, mClientManager.getWarmupState(mSession)); }
@SmallTest public void testValidSessionWarmup() { mClientManager.recordUidHasCalledWarmup(mUid); mClientManager.newSession(mCallback, mUid, null); assertEquals(ClientManager.SESSION_WARMUP, mClientManager.getWarmupState(mSession)); }
@SmallTest public void testValidSessionNoWarmup() { mClientManager.newSession(mCallback, mUid, null); assertEquals( ClientManager.SESSION_NO_WARMUP_NOT_CALLED, mClientManager.getWarmupState(mSession)); }