Backout be6da7f8989c due to bustage
authorKyle Machulis <kyle@nonpolynomial.com>
Wed, 22 Aug 2012 18:11:52 -0700
changeset 105132 7bced3d7427a358ea34309e5cff939ca215f510e
parent 105131 4d4e97519d50f30e230c944b2fce7a3a5d44dcd9
child 105133 24ae54fe53a7bf05267f2dc57fca27a9cb70e76e
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
milestone17.0a1
backs outbe6da7f8989cfe0e03929c85c6003cf938ac2cb4
Backout be6da7f8989c due to bustage
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;
   },