Bug 1128928 - Fix intermittent browser_social_chatwindow_resize.js failures with ASAN builds by increasing the number of tries used by waitForCondition() r=markh
authorTim Taubert <ttaubert@mozilla.com>
Tue, 10 Mar 2015 19:31:03 +0100
changeset 263477 fb64168bf663570e4cec92d049bbd1072147fc61
parent 263476 35827fc86c80f5a69abba9de8bb605c645acec0d
child 263478 e16054134e1291480bf63b5055d0e60cb0d4ed5a
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh
bugs1128928
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1128928 - Fix intermittent browser_social_chatwindow_resize.js failures with ASAN builds by increasing the number of tries used by waitForCondition() r=markh
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);