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() { public void testAboutPage() {
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent(); blockForGeckoReady();
// Load the about: page and verify its title // Load the about: page and verify its title
String url = "about:"; 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*/ 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() { public void testAddonManager() {
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent(); blockForGeckoReady();
// Use the menu to open the Addon Manger // Use the menu to open the Addon Manger
selectMenuItem("Add-ons"); selectMenuItem("Add-ons");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -33,7 +33,7 @@ public class testSearchSuggestions extends BaseTest {
} }
public void testSearchSuggestions() { public void testSearchSuggestions() {
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent(); blockForGeckoReady();
// Map of expected values. See robocop_suggestions.sjs. // Map of expected values. See robocop_suggestions.sjs.
final HashMap<String, ArrayList<String>> suggestMap = new HashMap<String, ArrayList<String>>(); 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 // should be plenty of time, even on slow devices
final int thumbnailDelay = 3000; final int thumbnailDelay = 3000;
mActions.expectGeckoEvent("Gecko:Ready").blockForEvent(); blockForGeckoReady();
// load sites; both will return HTTP 200 with a green background // load sites; both will return HTTP 200 with a green background
loadUrl(site1Url); loadUrl(site1Url);

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

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

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

@ -13,7 +13,7 @@ public class test_bug720538 extends PixelTest {
public void test_bug720538() { public void test_bug720538() {
String url = getAbsoluteUrl("/robocop/test_bug720538.html"); 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 * for this test, we load the associated test_bug720538.html file. this file has two