mobile/android/base/tests/testPromptGridInput.java

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     1 package org.mozilla.gecko.tests;
     3 import org.mozilla.gecko.Actions;
     5 public class testPromptGridInput extends BaseTest {
     6     protected int index = 1;
     7     public void testPromptGridInput() {
     8         blockForGeckoReady();
    10         test(1);
    12         testGridItem("Icon 1");
    13         testGridItem("Icon 2");
    14         testGridItem("Icon 3");
    15         testGridItem("Icon 4");
    16         testGridItem("Icon 5");
    17         testGridItem("Icon 6");
    18         testGridItem("Icon 7");
    19         testGridItem("Icon 8");
    20         testGridItem("Icon 9");
    21         testGridItem("Icon 10");
    22         testGridItem("Icon 11");
    24         mSolo.clickOnText("Icon 11");
    25         mSolo.clickOnText("OK");
    27         mAsserter.ok(waitForText("PASS"), "test passed", "PASS");
    28         mActions.sendSpecialKey(Actions.SpecialKey.BACK);
    29     }
    31     public void testGridItem(String title) {
    32         // Force the list to scroll if necessary
    33         mSolo.waitForText(title, 1, 500, true);
    34         mAsserter.ok(waitForText(title), "Found grid item", title);
    35     }
    37     public void test(final int num) {
    38         // Load about:blank between each test to ensure we reset state
    39         loadUrl("about:blank");
    40         mAsserter.ok(waitForText("about:blank"), "Loaded blank page", "page title match");
    42         loadUrl("chrome://roboextender/content/robocop_prompt_gridinput.html#test" + num);
    43     }
    44 }

mercurial