// Testing Case #1
  public void testLeaveVideoPageByBack() {
    enterVideoPageWaitForIdle();

    sendKeys(KeyEvent.KEYCODE_BACK);
    CommonTestUtil.waitPageForIdleSync(
        mInstrumentation,
        mMedia3DView,
        mActivity.getPortalPage(),
        CommonTestUtil.DEFAULT_PAGE_SWITCH_TIMEOUT_IN_MS);
    assertTrue(mMedia3DView.getCurrentPage() == mActivity.getPortalPage());
  }
  // Testing Case #7
  public void testBackOnMenuBar() {
    enterVideoPageWaitForIdle();
    // trigger menu bar
    CommonTestUtil.sendSingleTapConfirmedEventOnUiThread(
        mActivity, mMedia3DView, CommonTestUtil.NON_ACTOR_POINT);
    CommonTestUtil.waitMenuBarForActionSync(
        mInstrumentation, mMedia3DView, CommonTestUtil.DEFAULT_MENU_BAR_TIMEOUT_IN_MS);

    // click back icon on menu bar
    CommonTestUtil.sendTouchEventsOnUiThread(
        mActivity, mMedia3DView, CommonTestUtil.BACK_ICON_IN_TOP_MENU);
    CommonTestUtil.waitPageForIdleSync(
        mInstrumentation,
        mMedia3DView,
        mActivity.getPortalPage(),
        CommonTestUtil.DEFAULT_PAGE_SWITCH_TIMEOUT_IN_MS);
    assertTrue(mMedia3DView.getCurrentPage() == mActivity.getPortalPage());
  }
  public void enterVideoPageWaitForIdle() {
    validateNoNullMember();
    CommonTestUtil.waitPageForIdleSync(
        mInstrumentation,
        mMedia3DView,
        mActivity.getPortalPage(),
        CommonTestUtil.DEFAULT_PAGE_SWITCH_TIMEOUT_IN_MS);
    CommonTestUtil.waitLoadForIdleSync(
        mInstrumentation,
        mActivity.getVideoPage(),
        CommonTestUtil.DEFAULT_PAGE_SWITCH_TIMEOUT_IN_MS);

    CommonTestUtil.sendSingleTapConfirmedEventOnUiThread(
        mActivity, mMedia3DView, CommonTestUtil.VIDEO_ICON_IN_PORTALPAGE);
    CommonTestUtil.waitPageForIdleSync(
        mInstrumentation,
        mMedia3DView,
        mActivity.getVideoPage(),
        CommonTestUtil.DEFAULT_PAGE_SWITCH_TIMEOUT_IN_MS);

    assertTrue(mMedia3DView.getCurrentPage() == mActivity.getVideoPage());
  }