mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug 758792 - Robocop: remove waitForIdleSync calls in getActivityFromClick. r=jmaher
This commit is contained in:
parent
40cba13783
commit
504de523f2
@ -118,14 +118,18 @@ abstract class BaseTest extends ActivityInstrumentationTestCase2<Activity> {
|
||||
mAsserter.ok(clicked != false, "checking that awesome bar clicked", "awesome bar was clicked");
|
||||
return null;
|
||||
}
|
||||
// wait for click to take effect before waiting for activity
|
||||
// (otherwise we sometimes get the previous activity)
|
||||
getInstrumentation().waitForIdleSync();
|
||||
// Wait for click to take effect before waiting for activity
|
||||
// (otherwise we sometimes get the previous activity).
|
||||
// Previously, waitForIdleSync was used here but it was found
|
||||
// to hang very occasionally.
|
||||
mSolo.sleep(2000);
|
||||
Activity activity = inst.waitForMonitor(monitor);
|
||||
// give the activity time to render itself and initialize views
|
||||
// Give the activity time to render itself and initialize views
|
||||
// before continuing, so that views are created before access
|
||||
// attempts are made
|
||||
getInstrumentation().waitForIdleSync();
|
||||
// attempts are made. Again, waitForIdleSync was used here
|
||||
// previously, but replaced with a sleep to avoid hangs.
|
||||
// TODO: Investigate and document why these pauses are required.
|
||||
mSolo.sleep(2000);
|
||||
return activity;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user