Bug 841661 - Remove the observer in this test when it finishes so we don't get failures from it in unrelated tests. r=mcmanus

--HG--
extra : rebase_source : ba49ab425632c6b090b018818df2aa29c73d9cc9
This commit is contained in:
Joe Drew 2013-02-15 15:43:27 -05:00
parent ff3fa5c956
commit 6f9bacb0de

View File

@ -19,6 +19,8 @@ SimpleTest.waitForExplicitFinish();
const Ci = Components.interfaces;
const Cc = Components.classes;
var obs = Cc["@mozilla.org/observer-service;1"].getService();
obs = obs.QueryInterface(Ci.nsIObserverService);
var observer = {
QueryInterface: function (aIID) {
@ -32,12 +34,13 @@ var observer = {
ok(topic == "net:failed-to-process-uri-content", "wrong topic");
subject = subject.QueryInterface(Ci.nsIURI);
ok(subject.asciiSpec == "chrome://mochitests/content/chrome/image/test/mochitest/invalid.jpg", "wrong subject");
obs.removeObserver(this, "net:failed-to-process-uri-content", false);
SimpleTest.finish();
}
};
var obs = Cc["@mozilla.org/observer-service;1"].getService();
obs = obs.QueryInterface(Ci.nsIObserverService);
obs.addObserver(observer, "net:failed-to-process-uri-content", false);
</script>