@UiThreadTest
  public void testStatePause() {
    Instrumentation instr = this.getInstrumentation();
    assertNotNull(instr);

    instr.callActivityOnPause(mPlaceActivity);
    instr.callActivityOnResume(mPlaceActivity);
  } // end testStatePause
コード例 #2
0
  // Testing Case #4
  public void testPauseResume() {
    enterVideoPageWaitForIdle();

    mInstrumentation.callActivityOnPause(mActivity);
    CommonTestUtil.wait(mInstrumentation, CommonTestUtil.WAIT_FOR_PAGE_SWITCH_TIME_IN_SECS);

    mInstrumentation.callActivityOnResume(mActivity);
    CommonTestUtil.waitPageForIdleSync(
        mInstrumentation,
        mMedia3DView,
        mActivity.getVideoPage(),
        CommonTestUtil.DEFAULT_PAGE_SWITCH_TIMEOUT_IN_MS);
    assertTrue(mMedia3DView.getCurrentPage() == mActivity.getVideoPage());
  }
コード例 #3
0
 /**
  * 执行插件的onStop方法
  *
  * @see android.app.Activity#onStop()
  */
 @Override
 public void callOnPause() {
   // getPluginRef().call("onStop");
   i.callActivityOnPause(plugin);
 }