Bug 843619: Remove robocop test for tabs tray menu button. [r=gbrown] [a=bbajaj]
authorSriram Ramasubramanian <sriram@mozilla.com>
Tue, 26 Feb 2013 11:03:17 -0800
changeset 132401 5cc89947ea81cc348e79291192480ee95948a99f
parent 132400 cd1d1f737528efab06be15186881f2ae46f000d1
child 132402 d4e4f06d7360f70323273a2df1259e79ddf645ca
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown, bbajaj
bugs843619
milestone21.0a2
Bug 843619: Remove robocop test for tabs tray menu button. [r=gbrown] [a=bbajaj]
mobile/android/base/tests/robocop.ini
mobile/android/base/tests/testTabsTrayMenu.java.in
--- a/mobile/android/base/tests/robocop.ini
+++ b/mobile/android/base/tests/robocop.ini
@@ -15,17 +15,16 @@
 [testAxisLocking]
 [testAboutPage]
 [testWebContentContextMenu]
 [testPasswordProvider]
 # [testPasswordEncrypt] # see bug 824067
 [testFormHistory]
 [testBrowserProvider]
 [testSearchSuggestions]
-[testTabsTrayMenu]
 # [testThumbnails] # see bug 813107
 [testAddonManager]
 [testHistory]
 [testVkbOverlap]
 [testDoorHanger]
 [testTabHistory]
 [testShareLink]
 [testClearPrivateData]
deleted file mode 100644
--- a/mobile/android/base/tests/testTabsTrayMenu.java.in
+++ /dev/null
@@ -1,124 +0,0 @@
-#filter substitution
-package @ANDROID_PACKAGE_NAME@.tests;
-
-import @ANDROID_PACKAGE_NAME@.*;
-import android.app.Activity;
-import android.view.View;
-
-/* A simple test for TabsTray menu, to check if all its options are working as expected.
-First, the test opens a new private tab from the Tabs Drawer Menu,
-then it opens a new general tab from the Tabs Drawer Menu
-and finally it closes all tabs through the Close All Tabs option in the Tabs Drawer Menu.
-*/
-public class testTabsTrayMenu extends BaseTest {
-    private Element tabCount = null;
-    private Element tabs = null;
-    private Element addTab = null;
-    private Element Menu = null;
-    private Element addPrivateTab = null;
-    private Element closeTab = null;
-    private int tabCountInt = 0;
-
-    @Override
-    protected int getTestType() {
-        return TEST_MOCHITEST;
-    }
-
-    public void testTabsTrayMenu() {
-        String url = getAbsoluteUrl("/robocop/robocop_blank_01.html");
-        String url2 = getAbsoluteUrl("/robocop/robocop_blank_02.html");
-
-        blockForGeckoReady();
-
-        Activity activity = getActivity();
-        tabCount = mDriver.findElement(activity, "tabs_count");
-        tabs = mDriver.findElement(activity, "tabs");
-        Menu = mDriver.findElement(activity, "menu");
-        closeTab = mDriver.findElement(activity, "close");
-        mAsserter.ok(tabCount != null &&
-                     tabs != null &&
-                     Menu != null &&
-                     closeTab != null,
-                     "Checking elements", "all elements present");
-
-        int expectedTabCount = 1;
-        String tabCountText = tabCount.getText();
-        tabCountInt = Integer.parseInt(tabCountText);
-        mAsserter.is(tabCountInt, expectedTabCount, "Initial number of tabs correct");
-
-        addPrivateTab(url2);
-        expectedTabCount++;
-        tabCountText = tabCount.getText();
-        tabCountInt = Integer.parseInt(tabCountText);
-        mAsserter.is(tabCountInt, expectedTabCount, "Number of tabs increased");
-
-        addNewTab(url);
-        expectedTabCount++;
-        tabCountText = tabCount.getText();
-        tabCountInt = Integer.parseInt(tabCountText);
-        mAsserter.is(tabCountInt, expectedTabCount, "Number of tabs increased");
-
-        // Verifying if the private data is not listed in Awesomescreen
-        clickOnAwesomeBar();
-        mSolo.clickOnText("History");
-        mAsserter.ok(mSolo.waitForText("Browser Blank Page 01"), "Looking in History for the page loaded in the normal tab", "Fount it");
-        mAsserter.ok(mSolo.waitForText("Browser Blank Page 02") == false, "Looking in History for the page loaded in the private tab", "Page is not present in History");
-        mActions.sendSpecialKey(Actions.SpecialKey.BACK);
-
-        // Cleanup: close all opened tabs
-        expectedTabCount = 1;
-        closeTabs();
-        tabCountText = tabCount.getText();
-        tabCountInt = Integer.parseInt(tabCountText);
-        mAsserter.is(tabCountInt, expectedTabCount, "Number of tabs is 1");
-    }
-
-    private void addNewTab(String url) {
-        
-        // Open TabsTray Menu
-        boolean clicked = Menu.click();
-        if (!clicked) {
-            mAsserter.ok(clicked != false, "checking that tabs clicked", "tabs element clicked");
-        }
-        mSolo.clickOnText("New Tab");
-
-        /* Must pause before sending keys, until awesome bar is displayed; waiting for
-        known text is simple
-        */
-        mSolo.waitForText("History");
-
-        // Cannot use loadUrl(): getText fails because we are using a different urlbar
-        mActions.sendKeys(url);
-        hitEnterAndWait();
-    }
-
-    private void addPrivateTab(String url) {
-
-        // Open TabsTray Menu
-        boolean clicked = Menu.click();
-        if (!clicked) {
-            mAsserter.ok(clicked != false, "checking that tabs menu clicked", "tabs menu element clicked");
-        }
-        mSolo.clickOnText("New Private Tab");
-
-        // Waiting for about:home opened in Private Mode
-        mSolo.waitForText("Enter Search or Address");
-
-        loadUrl(url);
-    }
-
-    private void closeTabs() {
-        String tabCountText = null;
-
-        // Open TabsTray Menu
-        boolean clicked = Menu.click();
-        if (!clicked) {
-            mAsserter.ok(clicked != false, "checking that tabs menu clicked", "tabs menu element clicked");
-        }
-        mSolo.clickOnText("Close All Tabs");
-
-        // Waiting for about:home
-        mSolo.waitForText("Enter Search or Address");
-    }
-}
-