bug 790102 - Frequent trobocheck, trobopan talosError: 'GeckoEventExpecter: blockForEvent timeout: Gecko:Ready [browser_output.txt]', use helper function to block for gecko:ready r=gbrown

This commit is contained in:
Brad Lassey 2012-10-25 15:37:39 -04:00
Родитель 4fef198bfa
Коммит caa54a233f
27 изменённых файлов: 28 добавлений и 31 удалений

Просмотреть файл

@ -16,7 +16,7 @@ public class testAboutPage extends PixelTest {
}
public void testAboutPage() {
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
// Load the about: page and verify its title
String url = "about:";

Просмотреть файл

@ -27,7 +27,7 @@ public class testAddonManager extends PixelTest {
With the Addons Manager open the test will verify that when it is opened again from the menu no new tab will be opened*/
public void testAddonManager() {
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
// Use the menu to open the Addon Manger
selectMenuItem("Add-ons");

Просмотреть файл

@ -41,7 +41,7 @@ public class testAllPagesTab extends BaseTest {
}
public void testAllPagesTab() {
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
// load one page so there is something in our history
String url = getAbsoluteUrl("/robocop/robocop_big_link.html");

Просмотреть файл

@ -10,7 +10,7 @@ public class testAwesomebar extends BaseTest {
}
public void testAwesomebar() {
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
String url = getAbsoluteUrl("/robocop/robocop_blank_01.html");
loadUrl(url);

Просмотреть файл

@ -23,7 +23,7 @@ public class testAxisLocking extends PixelTest {
MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
// load page and check we're at 0,0
loadAndVerifyBoxes(url);

Просмотреть файл

@ -74,7 +74,7 @@ public class testBookmark extends PixelTest {
public void runAwesomeScreenTest() {
final long PAINT_CLEAR_DELAY = 1000; // milliseconds
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
// Open the bookmark list and check the root folder view
ListView bookmarksList = openBookmarksList();

Просмотреть файл

@ -21,7 +21,7 @@ public class testBookmarklets extends PixelTest {
final String js = "javascript:alert(12 + .34)";
boolean alerted;
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
// load a standard page so bookmarklets work
loadAndPaint(url);

Просмотреть файл

@ -41,7 +41,7 @@ public class testBookmarksTab extends BaseTest {
}
public void testBookmarksTab() {
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
String url = "http://www.example.com";
// add one page to desktop folders so that we can see them

Просмотреть файл

@ -20,7 +20,7 @@ public class testCheck extends PixelTest {
public void testCheck() {
String url = getAbsoluteUrl("/startup_test/fennecmark/timecube.html");
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
loadAndPaint(url);

Просмотреть файл

@ -12,7 +12,7 @@ public class testCheck2 extends PixelTest {
public void testCheck2() {
String url = getAbsoluteUrl("/startup_test/fennecmark/cnn/cnn.com/index.html");
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
loadAndPaint(url);
mDriver.setupScrollHandling();

Просмотреть файл

@ -23,7 +23,7 @@ public class testCheck3 extends PixelTest {
return;
}
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
loadAndPaint(url);
mDriver.setupScrollHandling();

Просмотреть файл

@ -21,7 +21,7 @@ public class testFlingCorrectness extends PixelTest {
MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
// load page and check we're at 0,0
loadAndVerifyBoxes(url);

Просмотреть файл

@ -33,9 +33,8 @@ public class testFormHistory extends BaseTest {
ContentValues[] cvs = new ContentValues[1];
cvs[0] = new ContentValues();
Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("Gecko:Ready");
contentEventExpecter.blockForEvent();
blockForGeckoReady();
Uri formHistoryUri;
Uri insertUri;
Uri expectedUri;

Просмотреть файл

@ -19,7 +19,7 @@ public class testHistory extends PixelTest {
}
public void testHistory() {
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
String url = getAbsoluteUrl("/robocop/robocop_blank_01.html");
String url2 = getAbsoluteUrl("/robocop/robocop_blank_02.html");

Просмотреть файл

@ -45,7 +45,7 @@ public class testHistoryTab extends PixelTest {
}
public void testHistoryTab() {
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
// very approximate date-rollover detection
Calendar cal = new GregorianCalendar();

Просмотреть файл

@ -18,7 +18,7 @@ public class testLoad extends PixelTest {
public void testLoad() {
String url = getAbsoluteUrl("/robocop/robocop_boxes.html");
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
loadAndVerifyBoxes(url);

Просмотреть файл

@ -23,7 +23,7 @@ public class testNewTab extends BaseTest {
String url = getAbsoluteUrl("/robocop/robocop_blank_01.html");
String url2 = getAbsoluteUrl("/robocop/robocop_blank_02.html");
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
Activity activity = getActivity();
tabCount = mDriver.findElement(activity, "tabs_count");

Просмотреть файл

@ -21,7 +21,7 @@ public class testOverscroll extends PixelTest {
MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
// load page and check we're at 0,0
loadAndVerifyBoxes(url);

Просмотреть файл

@ -17,7 +17,7 @@ public class testPan extends PixelTest {
public void testPan() {
String url = getAbsoluteUrl("/startup_test/fennecmark/wikipedia.html");
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
loadAndPaint(url);

Просмотреть файл

@ -21,7 +21,7 @@ public class testPanCorrectness extends PixelTest {
MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop());
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
// load page and check we're at 0,0
loadAndVerifyBoxes(url);

Просмотреть файл

@ -27,8 +27,7 @@ public class testPasswordEncrypt extends BaseTest {
mAsserter.isnot(cr, null, "Found a content resolver");
ContentValues cvs = new ContentValues();
Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("Gecko:Ready");
contentEventExpecter.blockForEvent();
blockForGeckoReady();
File db = new File(mProfile, "signons.sqlite");
String dbPath = db.getPath();

Просмотреть файл

@ -31,8 +31,7 @@ public class testPasswordProvider extends BaseTest {
ContentValues[] cvs = new ContentValues[1];
cvs[0] = new ContentValues();
Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("Gecko:Ready");
contentEventExpecter.blockForEvent();
blockForGeckoReady();
Uri passwordUri;
try {

Просмотреть файл

@ -15,7 +15,7 @@ public class testPermissions extends PixelTest {
}
public void testPermissions() {
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
geolocationTest();
}

Просмотреть файл

@ -33,7 +33,7 @@ public class testSearchSuggestions extends BaseTest {
}
public void testSearchSuggestions() {
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
// Map of expected values. See robocop_suggestions.sjs.
final HashMap<String, ArrayList<String>> suggestMap = new HashMap<String, ArrayList<String>>();

Просмотреть файл

@ -45,7 +45,7 @@ public class testThumbnails extends BaseTest {
// should be plenty of time, even on slow devices
final int thumbnailDelay = 3000;
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
// load sites; both will return HTTP 200 with a green background
loadUrl(site1Url);

Просмотреть файл

@ -16,7 +16,7 @@ public class testWebContentContextMenu extends PixelTest {
}
public void testWebContentContextMenu() {
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
DisplayMetrics dm = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(dm);

Просмотреть файл

@ -13,7 +13,7 @@ public class test_bug720538 extends PixelTest {
public void test_bug720538() {
String url = getAbsoluteUrl("/robocop/test_bug720538.html");
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent();
blockForGeckoReady();
/*
* for this test, we load the associated test_bug720538.html file. this file has two