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