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