Backed out changeset afe70927277c (bug 1330014) for xpcshell test_storage_manager.js failures
authorIris Hsiao <ihsiao@mozilla.com>
Fri, 13 Jan 2017 11:06:38 +0800
changeset 329211 3e9a029b62c412bc34ca2da8565b3e733ffdfd2b
parent 329210 b02dbc8e2208a486c21c9549a106e4ca9d5681cf
child 329212 33c475c8f360dddf70271f42c67b9a5b803c4fbb
push id36020
push userihsiao@mozilla.com
push dateFri, 13 Jan 2017 03:06:54 +0000
treeherderautoland@33c475c8f360 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1330014
milestone53.0a1
backs outafe70927277c0e6c2f62917c4215624e5c8657ef
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
Backed out changeset afe70927277c (bug 1330014) for xpcshell test_storage_manager.js failures
services/common/rest.js
services/common/tests/unit/test_hawkclient.js
services/common/tests/unit/test_hawkrequest.js
services/fxaccounts/tests/xpcshell/test_client.js
services/sync/modules/addonutils.js
services/sync/modules/engines.js
services/sync/modules/userapi.js
services/sync/tps/extensions/tps/resource/tps.jsm
--- a/services/common/rest.js
+++ b/services/common/rest.js
@@ -97,17 +97,17 @@ RESTRequest.prototype = {
   _logName: "Services.Common.RESTRequest",
 
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsIBadCertListener2,
     Ci.nsIInterfaceRequestor,
     Ci.nsIChannelEventSink
   ]),
 
-  /** Public API: **/
+  /** * Public API: ***/
 
   /**
    * A constant boolean that indicates whether this object will automatically
    * utf-8 encode request bodies passed as an object. Used for feature detection
    * so, eg, loop can use the same source code for old and new Firefox versions.
    */
   willUTF8EncodeObjectRequests: true,
 
@@ -288,17 +288,17 @@ RESTRequest.prototype = {
     this.channel.cancel(Cr.NS_BINDING_ABORTED);
 
     if (this.timeoutTimer) {
       // Clear the abort timer now that the channel is done.
       this.timeoutTimer.clear();
     }
   },
 
-  /** Implementation stuff **/
+  /** * Implementation stuff ***/
 
   dispatch: function dispatch(method, data, onComplete, onProgress) {
     if (this.status != this.NOT_SENT) {
       throw "Request has already been sent!";
     }
 
     this.method = method;
     if (onComplete) {
@@ -407,17 +407,17 @@ RESTRequest.prototype = {
     if (!this.onComplete) {
       this._log.error("Unexpected error: onComplete not defined in " +
                       "abortTimeout.");
       return;
     }
     this.onComplete(error);
   },
 
-  /** nsIStreamListener **/
+  /** * nsIStreamListener ***/
 
   onStartRequest: function onStartRequest(channel) {
     if (this.status == this.ABORTED) {
       this._log.trace("Not proceeding with onStartRequest, request was aborted.");
       return;
     }
 
     try {
@@ -568,23 +568,23 @@ RESTRequest.prototype = {
       this.onComplete(ex);
       this.onComplete = this.onProgress = null;
       return;
     }
 
     this.delayTimeout();
   },
 
-  /** nsIInterfaceRequestor **/
+  /** * nsIInterfaceRequestor ***/
 
   getInterface(aIID) {
     return this.QueryInterface(aIID);
   },
 
-  /** nsIBadCertListener2 **/
+  /** * nsIBadCertListener2 ***/
 
   notifyCertProblem: function notifyCertProblem(socketInfo, sslStatus, targetHost) {
     this._log.warn("Invalid HTTPS certificate encountered!");
     // Suppress invalid HTTPS certificate warnings in the UI.
     // (The request will still fail.)
     return true;
   },
 
@@ -596,17 +596,17 @@ RESTRequest.prototype = {
   shouldCopyOnRedirect: function shouldCopyOnRedirect(oldChannel, newChannel, flags) {
     let isInternal = !!(flags & Ci.nsIChannelEventSink.REDIRECT_INTERNAL);
     let isSameURI  = newChannel.URI.equals(oldChannel.URI);
     this._log.debug("Channel redirect: " + oldChannel.URI.spec + ", " +
                     newChannel.URI.spec + ", internal = " + isInternal);
     return isInternal && isSameURI;
   },
 
-  /** nsIChannelEventSink **/
+  /** * nsIChannelEventSink ***/
   asyncOnChannelRedirect:
     function asyncOnChannelRedirect(oldChannel, newChannel, flags, callback) {
 
     let oldSpec = (oldChannel && oldChannel.URI) ? oldChannel.URI.spec : "<undefined>";
     let newSpec = (newChannel && newChannel.URI) ? newChannel.URI.spec : "<undefined>";
     this._log.debug("Channel redirect: " + oldSpec + ", " + newSpec + ", " + flags);
 
     try {
--- a/services/common/tests/unit/test_hawkclient.js
+++ b/services/common/tests/unit/test_hawkclient.js
@@ -307,16 +307,17 @@ add_task(function* test_retry_request_on
         return;
       }
 
       // Second time through, timestamp should be corrected by client
       do_check_true(delta < MINUTE_MS);
       let message = "i love you!!!";
       response.setStatusLine(request.httpVersion, 200, "OK");
       response.bodyOutputStream.write(message, message.length);
+
     }
   });
 
   let client = new HawkClient(server.baseURI);
   function getOffset() {
     return client.localtimeOffsetMsec;
   }
 
@@ -455,16 +456,17 @@ add_task(function* test_401_then_500() {
       }
 
       // Second time through, timestamp should be corrected by client
       // And fail on the client
       do_check_true(delta < MINUTE_MS);
       let message = "Cannot get ye flask.";
       response.setStatusLine(request.httpVersion, 500, "Internal server error");
       response.bodyOutputStream.write(message, message.length);
+
     }
   });
 
   let client = new HawkClient(server.baseURI);
   function getOffset() {
     return client.localtimeOffsetMsec;
   }
 
--- a/services/common/tests/unit/test_hawkrequest.js
+++ b/services/common/tests/unit/test_hawkrequest.js
@@ -70,16 +70,17 @@ add_test(function test_intl_accept_langu
         setLanguagePref(languages[testCount]);
         return;
       }
 
       // We've checked all the entries in languages[]. Cleanup and move on.
       do_print("Checked " + testCount + " languages. Removing checkLanguagePref as pref observer.");
       Services.prefs.removeObserver("intl.accept_languages", checkLanguagePref);
       run_next_test();
+
     });
   }
 });
 
 add_test(function test_hawk_authenticated_request() {
   let onProgressCalled = false;
   let postData = {your: "data"};
 
--- a/services/fxaccounts/tests/xpcshell/test_client.js
+++ b/services/fxaccounts/tests/xpcshell/test_client.js
@@ -274,32 +274,36 @@ add_task(function* test_signIn() {
       let jsonBody = JSON.parse(body);
 
       if (jsonBody.email == unicodeUsername) {
         do_check_eq("", request._queryString);
         do_check_eq(jsonBody.authPW, "08b9d111196b8408e8ed92439da49206c8ecfbf343df0ae1ecefcd1e0174a8b6");
         response.setStatusLine(request.httpVersion, 200, "OK");
         response.bodyOutputStream.write(sessionMessage_noKey,
                                         sessionMessage_noKey.length);
+
       } else if (jsonBody.email == "you@example.com") {
         do_check_eq("keys=true", request._queryString);
         do_check_eq(jsonBody.authPW, "93d20ec50304d496d0707ec20d7e8c89459b6396ec5dd5b9e92809c5e42856c7");
         response.setStatusLine(request.httpVersion, 200, "OK");
         response.bodyOutputStream.write(sessionMessage_withKey,
                                         sessionMessage_withKey.length);
+
       } else if (jsonBody.email == "You@example.com") {
         // Error trying to sign in with a wrong capitalization
         response.setStatusLine(request.httpVersion, 400, "Bad request");
         response.bodyOutputStream.write(errorMessage_wrongCap,
                                         errorMessage_wrongCap.length);
+
       } else {
         // Error trying to sign in to nonexistent account
         response.setStatusLine(request.httpVersion, 400, "Bad request");
         response.bodyOutputStream.write(errorMessage_notExistent,
                                         errorMessage_notExistent.length);
+
       }
     },
   });
 
   // Login without retrieving optional keys
   let client = new FxAccountsClient(server.baseURI);
   let result = yield client.signIn(unicodeUsername, 'bigsecret');
   do_check_eq(FAKE_SESSION_TOKEN, result.sessionToken);
@@ -345,16 +349,17 @@ add_task(function* test_signOut() {
         response.setStatusLine(request.httpVersion, 200, "OK");
         response.bodyOutputStream.write(signoutMessage, signoutMessage.length);
         return;
       }
 
       // Error trying to sign out of nonexistent account
       response.setStatusLine(request.httpVersion, 400, "Bad request");
       response.bodyOutputStream.write(errorMessage, errorMessage.length);
+
     },
   });
 
   let client = new FxAccountsClient(server.baseURI);
   let result = yield client.signOut("FakeSession");
   do_check_eq(typeof result, "object");
 
   // Trigger error path
@@ -383,16 +388,17 @@ add_task(function* test_recoveryEmailSta
         response.setStatusLine(request.httpVersion, 200, "OK");
         response.bodyOutputStream.write(emailStatus, emailStatus.length);
         return;
       }
 
       // Second call gets an error trying to query a nonexistent account
       response.setStatusLine(request.httpVersion, 400, "Bad request");
       response.bodyOutputStream.write(errorMessage, errorMessage.length);
+
     },
   });
 
   let client = new FxAccountsClient(server.baseURI);
   let result = yield client.recoveryEmailStatus(FAKE_SESSION_TOKEN);
   do_check_eq(result.verified, true);
 
   // Trigger error path
@@ -411,16 +417,17 @@ add_task(function* test_recoveryEmailSta
   let server = httpd_setup({
     "/recovery_email/status": function(request, response) {
       do_check_true(request.hasHeader("Authorization"));
       // if there is a query string then it will have a reason
       do_check_eq("reason=push", request._queryString);
 
       response.setStatusLine(request.httpVersion, 200, "OK");
       response.bodyOutputStream.write(emailStatus, emailStatus.length);
+
     },
   });
 
   let client = new FxAccountsClient(server.baseURI);
   let result = yield client.recoveryEmailStatus(FAKE_SESSION_TOKEN, {
     reason: "push",
   });
   do_check_eq(result.verified, true);
@@ -440,16 +447,17 @@ add_task(function* test_resendVerificati
         response.setStatusLine(request.httpVersion, 200, "OK");
         response.bodyOutputStream.write(emptyMessage, emptyMessage.length);
         return;
       }
 
       // Second call gets an error trying to query a nonexistent account
       response.setStatusLine(request.httpVersion, 400, "Bad request");
       response.bodyOutputStream.write(errorMessage, errorMessage.length);
+
     },
   });
 
   let client = new FxAccountsClient(server.baseURI);
   let result = yield client.resendVerificationEmail(FAKE_SESSION_TOKEN);
   do_check_eq(JSON.stringify(result), emptyMessage);
 
   // Trigger error path
@@ -562,16 +570,17 @@ add_task(function* test_signCertificate(
         response.setStatusLine(request.httpVersion, 200, "OK");
         response.bodyOutputStream.write(certSignMessage, certSignMessage.length);
         return;
       }
 
       // Second attempt, trigger error
       response.setStatusLine(request.httpVersion, 400, "Bad request");
       response.bodyOutputStream.write(errorMessage, errorMessage.length);
+
     },
   });
 
   let client = new FxAccountsClient(server.baseURI);
   let result = yield client.signCertificate(FAKE_SESSION_TOKEN, JSON.stringify({foo: "bar"}), 600);
   do_check_eq("baz", result.bar);
 
   // Account doesn't exist
--- a/services/sync/modules/addonutils.js
+++ b/services/sync/modules/addonutils.js
@@ -488,16 +488,17 @@ AddonUtilsInternal.prototype = {
       AddonManager.addAddonListener(listener);
     }
 
     this._log.info("Updating userDisabled flag: " + addon.id + " -> " + value);
     addon.userDisabled = !!value;
 
     if (!addon.appDisabled) {
       cb(null, addon);
+
     }
     // Else the listener will handle invoking the callback.
   },
 
 };
 
 XPCOMUtils.defineLazyGetter(this, "AddonUtils", function() {
   return new AddonUtilsInternal();
--- a/services/sync/modules/engines.js
+++ b/services/sync/modules/engines.js
@@ -245,16 +245,17 @@ Tracker.prototype = {
           this.stopTracking();
           this._isTracking = false;
         }
         return;
       case "nsPref:changed":
         if (data == PREFS_BRANCH + "engine." + this.engine.prefName) {
           this.onEngineEnabledChanged(this.engine.enabled);
         }
+
     }
   }
 };
 
 
 
 /**
  * The Store serves as the interface between Sync and stored data.
--- a/services/sync/modules/userapi.js
+++ b/services/sync/modules/userapi.js
@@ -130,20 +130,23 @@ UserAPI10Client.prototype = {
     if (error) {
       cb(error, null);
       return;
     }
 
     let body = request.response.body;
     if (body == "0") {
       cb(null, false);
+
     } else if (body == "1") {
       cb(null, true);
+
     } else {
       cb(new Error("Unknown response from server: " + body), null);
+
     }
   },
 
   _onWeaveNode: function _onWeaveNode(cb, request, error) {
     if (error) {
       cb.network = true;
       cb(error, null);
       return;
@@ -170,16 +173,17 @@ UserAPI10Client.prototype = {
       case 404:
         error.notFound = true;
         break;
       default:
         error.message = "Unexpected response code: " + response.status;
     }
 
     cb(error, null);
+
   },
 
   _onChangePassword: function _onChangePassword(cb, request, error) {
     this._log.info("Password change response received: " +
                    request.response.status);
     if (error) {
       cb(error);
       return;
@@ -209,11 +213,12 @@ UserAPI10Client.prototype = {
       cb(null, response.body);
       return;
     }
 
     error = new Error("Could not create user.");
     error.body = response.body;
 
     cb(error, null);
+
   },
 };
 Object.freeze(UserAPI10Client.prototype);
--- a/services/sync/tps/extensions/tps/resource/tps.jsm
+++ b/services/sync/tps/extensions/tps/resource/tps.jsm
@@ -567,18 +567,20 @@ var TPS = {
       throw (e);
     }
   },
 
   MozmillEndTestListener: function TPS__MozmillEndTestListener(obj) {
     Logger.logInfo("mozmill endTest: " + JSON.stringify(obj));
     if (obj.failed > 0) {
       this.DumpError('mozmill test failed, name: ' + obj.name + ', reason: ' + JSON.stringify(obj.fails));
+
     } else if ('skipped' in obj && obj.skipped) {
       this.DumpError('mozmill test failed, name: ' + obj.name + ', reason: ' + obj.skipped_reason);
+
     } else {
       Utils.namedTimer(function() {
         this.FinishAsyncOperation();
       }, 2000, this, "postmozmilltest");
     }
   },
 
   MozmillSetTestListener: function TPS__MozmillSetTestListener(obj) {
@@ -878,16 +880,17 @@ var TPS = {
       this.shouldValidateBookmarks = false;
 
       // Always give Sync an extra tick to initialize. If we waited for the
       // service:ready event, this is required to ensure all handlers have
       // executed.
       Utils.nextTick(this._executeTestPhase.bind(this, file, phase, settings));
     } catch (e) {
       this.DumpError("RunTestPhase failed", e);
+
     }
   },
 
   /**
    * Executes a single test phase.
    *
    * This is called by RunTestPhase() after the environment is validated.
    */
@@ -940,16 +943,17 @@ var TPS = {
       Weave.Svc.Prefs.set("client.name", this.phases[this._currentPhase]);
 
       this._interceptSyncTelemetry();
 
       // start processing the test actions
       this._currentAction = 0;
     } catch (e) {
       this.DumpError("_executeTestPhase failed", e);
+
     }
   },
 
   /**
    * Override sync telemetry functions so that we can detect errors generating
    * the sync ping, and count how many pings we report.
    */
   _interceptSyncTelemetry() {