Backing out 542abbd15139 due to incorrect commit messages
authorKyle Machulis <kyle@nonpolynomial.com>
Wed, 22 Aug 2012 18:00:57 -0700
changeset 105127 d029dd0ae5a5676c7116bc1609ad26ecae316964
parent 105126 542abbd151391c20a58cc7b05c2fa2e988591ff2
child 105128 38535165c87b112e95b8f7e95845ded6cf643647
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
milestone17.0a1
Backing out 542abbd15139 due to incorrect commit messages
dom/base/test/test_domrequest.html
testing/mochitest/tests/SimpleTest/specialpowersAPI.js
--- a/dom/base/test/test_domrequest.html
+++ b/dom/base/test/test_domrequest.html
@@ -45,50 +45,19 @@ is(req.result, "my result", "correct res
 
 // fire error
 req = reqserv.createRequest(window);
 ev = null;
 req.onerror = function(e) {
   ev = e;
 }
 reqserv.fireError(req, "OhMyError");
-ok(ev, "got error event");
+ok(ev, "got success event");
 is(ev.type, "error", "correct type during error");
 is(ev.target, req, "correct target during error");
 is(req.readyState, "done", "correct readyState after error");
 is(req.error.name, "OhMyError", "correct error after error");
 is(req.result, undefined, "correct result after error");
 
-// fire success
-req = reqserv.createRequest(window);
-ev = null;
-req.onsuccess = function(e) {
-  ev = e;
-  ok(ev, "got async success event");
-  is(ev.type, "success", "correct type during async success");
-  is(ev.target, this, "correct target during async success");
-  is(this.readyState, "done", "correct readyState after async success");
-  is(this.error, null, "correct error after async success");
-  is(this.result, "my async result", "correct result after async success");
-}
-reqserv.fireSuccessAsync(req, "my async result");
-
-// fire error
-req = reqserv.createRequest(window);
-ev = null;
-req.onerror = function(e) {
-  ev = e;
-  ok(ev, "got async error event");
-  is(ev.type, "error", "correct type during async error");
-  is(ev.target, this, "correct target during async error");
-  is(this.readyState, "done", "correct readyState after async error");
-  is(this.error.name, "OhMyAsyncError", "correct error after async error");
-  is(this.result, undefined, "correct result after async error");
-  SimpleTest.finish();
-}
-reqserv.fireErrorAsync(req, "OhMyAsyncError");
-
-SimpleTest.waitForExplicitFinish();
-
 </script>
 </pre>
 </body>
 </html>
--- a/testing/mochitest/tests/SimpleTest/specialpowersAPI.js
+++ b/testing/mochitest/tests/SimpleTest/specialpowersAPI.js
@@ -919,18 +919,17 @@ SpecialPowersAPI.prototype = {
       getService(Ci.nsIEventListenerService).
       removeSystemEventListener(target, type, listener, useCapture);
   },
 
   getDOMRequestService: function() {
     var serv = Cc["@mozilla.org/dom/dom-request-service;1"].
       getService(Ci.nsIDOMRequestService);
     var res = { __exposedProps__: {} };
-    var props = ["createRequest", "fireError", "fireSuccess", 
-								 "fireErrorAsync", "fireSuccessAsync"];
+    var props = ["createRequest", "fireError", "fireSuccess"];
     for (i in props) {
       let prop = props[i];
       res[prop] = function() { return serv[prop].apply(serv, arguments) };
       res.__exposedProps__[prop] = "r";
     }
     return res;
   },