Bug 1128928 - Fix intermittent browser_social_chatwindow_resize.js failures with ASAN builds by increasing the number of tries used by waitForCondition(). r=markh, a=test-only
authorTim Taubert <ttaubert@mozilla.com>
Tue, 10 Mar 2015 19:31:03 +0100
changeset 250361 f758eb029b69
parent 250360 18ecbc81b0e4
child 250362 09ac7b7f011a
push id4560
push userryanvm@gmail.com
push date2015-03-12 14:27 +0000
treeherdermozilla-beta@05df69e4ada6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh, test-only
bugs1128928
milestone37.0
Bug 1128928 - Fix intermittent browser_social_chatwindow_resize.js failures with ASAN builds by increasing the number of tries used by waitForCondition(). r=markh, a=test-only
browser/base/content/test/social/browser_social_chatwindow_resize.js
browser/base/content/test/social/head.js
--- a/browser/base/content/test/social/browser_social_chatwindow_resize.js
+++ b/browser/base/content/test/social/browser_social_chatwindow_resize.js
@@ -40,17 +40,17 @@ function test() {
       // executeSoon to let the browser UI observers run first
       runSocialTests(tests, undefined, postSubTest, function() {
         window.moveTo(oldleft, window.screenY)
         window.resizeTo(oldwidth, window.outerHeight);
         port.close();
         finishcb();
       });
     },
-    "waitForProviderLoad: provider profile was not set");
+    "waitForProviderLoad: provider profile was not set", 100);
   });
 }
 
 var tests = {
 
   // resize and collapse testing.
   testBrowserResize: function(next, mode) {
     let chats = document.getElementById("pinnedchats");
--- a/browser/base/content/test/social/head.js
+++ b/browser/base/content/test/social/head.js
@@ -6,20 +6,20 @@ Components.utils.import("resource://gre/
 
 XPCOMUtils.defineLazyModuleGetter(this, "Promise",
   "resource://gre/modules/Promise.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Task",
   "resource://gre/modules/Task.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
   "resource://gre/modules/PlacesUtils.jsm");
 
-function waitForCondition(condition, nextTest, errorMsg) {
+function waitForCondition(condition, nextTest, errorMsg, numTries = 30) {
   var tries = 0;
   var interval = setInterval(function() {
-    if (tries >= 30) {
+    if (tries >= numTries) {
       ok(false, errorMsg);
       moveOn();
     }
     var conditionPassed;
     try {
       conditionPassed = condition();
     } catch (e) {
       ok(false, e + "\n" + e.stack);