mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 716937 - Make the testBookmark test actually pass. r=jmaher
Previously it would type in a URL and then attempt to verify it as something else. Fix so that it doesn't try to verify a wrong URL.
This commit is contained in:
parent
55837d51d2
commit
d43e5e5177
@ -73,15 +73,20 @@ abstract class BaseTest extends ActivityInstrumentationTestCase2<Activity> {
|
||||
Instrumentation inst = getInstrumentation();
|
||||
Instrumentation.ActivityMonitor monitor = inst.addMonitor((String)null, null, false);
|
||||
element.click();
|
||||
return inst.waitForMonitor(monitor);
|
||||
Activity activity = inst.waitForMonitor(monitor);
|
||||
getInstrumentation().waitForIdleSync();
|
||||
return activity;
|
||||
}
|
||||
|
||||
protected final Activity clickOnAwesomeBar() {
|
||||
Element awesomebar = mDriver.findElement(mActivity, "awesome_bar");
|
||||
return getActivityFromClick(awesomebar);
|
||||
}
|
||||
|
||||
protected final void enterUrl(String url) {
|
||||
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
|
||||
Element awesomebar = mDriver.findElement(mActivity, "awesome_bar");
|
||||
Activity awesomeBarActivity = getActivityFromClick(awesomebar);
|
||||
getInstrumentation().waitForIdleSync();
|
||||
|
||||
Activity awesomeBarActivity = clickOnAwesomeBar();
|
||||
Element urlbar = mDriver.findElement(awesomeBarActivity, "awesomebar_text");
|
||||
mActions.sendKeys(url);
|
||||
mAsserter.is(urlbar.getText(), url, "Awesomebar URL typed properly");
|
||||
@ -100,10 +105,7 @@ abstract class BaseTest extends ActivityInstrumentationTestCase2<Activity> {
|
||||
}
|
||||
|
||||
protected final void verifyUrl(String url) {
|
||||
Element awesomebar = mDriver.findElement(mActivity, "awesome_bar");
|
||||
Activity awesomeBarActivity = getActivityFromClick(awesomebar);
|
||||
getInstrumentation().waitForIdleSync();
|
||||
|
||||
Activity awesomeBarActivity = clickOnAwesomeBar();
|
||||
Element urlbar = mDriver.findElement(awesomeBarActivity, "awesomebar_text");
|
||||
mAsserter.is(urlbar.getText(), url, "Awesomebar URL stayed the same");
|
||||
}
|
||||
|
@ -13,10 +13,8 @@ public class testBookmark extends BaseTest {
|
||||
mActions.sendSpecialKey(Actions.SpecialKey.DOWN);
|
||||
hitEnterAndWait();
|
||||
|
||||
verifyUrl(URL);
|
||||
|
||||
//Click the Top item in the history list.
|
||||
getInstrumentation().waitForIdleSync();
|
||||
clickOnAwesomeBar();
|
||||
mActions.sendSpecialKey(Actions.SpecialKey.RIGHT);
|
||||
mActions.sendSpecialKey(Actions.SpecialKey.RIGHT);
|
||||
getInstrumentation().waitForIdleSync();
|
||||
|
Loading…
Reference in New Issue
Block a user