mobile/android/base/tests/testLinkContextMenu.java

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

     1 package org.mozilla.gecko.tests;
     4 public class testLinkContextMenu extends ContentContextMenuTest {
     6     // Test website strings
     7     private static String LINK_PAGE_URL;
     8     private static String BLANK_PAGE_URL;
     9     private static final String LINK_PAGE_TITLE = "Big Link";
    10     private static final String linkMenuItems [] = { "Open Link in New Tab", "Open Link in Private Tab", "Copy Link", "Share Link", "Bookmark Link"};
    12     public void testLinkContextMenu() {
    13         blockForGeckoReady();
    15         LINK_PAGE_URL=getAbsoluteUrl("/robocop/robocop_big_link.html");
    16         BLANK_PAGE_URL=getAbsoluteUrl("/robocop/robocop_blank_01.html");
    17         inputAndLoadUrl(LINK_PAGE_URL);
    18         waitForText(LINK_PAGE_TITLE);
    20         verifyContextMenuItems(linkMenuItems); // Verify context menu items are correct
    21         openTabFromContextMenu(linkMenuItems[0],2); // Test the "Open in New Tab" option - expecting 2 tabs: the original and the new one
    22         openTabFromContextMenu(linkMenuItems[1],2); // Test the "Open in Private Tab" option - expecting only 2 tabs in normal mode
    23         verifyCopyOption(linkMenuItems[2], BLANK_PAGE_URL); // Test the "Copy Link" option
    24         verifyShareOption(linkMenuItems[3], LINK_PAGE_TITLE); // Test the "Share Link" option
    25         verifyBookmarkLinkOption(linkMenuItems[4], BLANK_PAGE_URL); // Test the "Bookmark Link" option
    26     }
    28     @Override
    29     public void tearDown() throws Exception {
    30         mDatabaseHelper.deleteBookmark(BLANK_PAGE_URL);
    31         super.tearDown();
    32     }
    33 }

mercurial