diff --git a/image/test/unit/async_load_tests.js b/image/test/unit/async_load_tests.js index 121a3feac342..e5b824c83277 100644 --- a/image/test/unit/async_load_tests.js +++ b/image/test/unit/async_load_tests.js @@ -51,13 +51,10 @@ function checkClone(other_listener, aRequest) } // Ensure that all the callbacks were called on aRequest. -function checkAllCallbacks(listener, aRequest) +function checkSizeAndLoad(listener, aRequest) { do_check_neq(listener.state & SIZE_AVAILABLE, 0); - do_check_neq(listener.state & FRAME_COMPLETE, 0); - do_check_neq(listener.state & DECODE_COMPLETE, 0); do_check_neq(listener.state & LOAD_COMPLETE, 0); - do_check_eq(listener.state, ALL_BITS); do_test_finished(); } @@ -71,7 +68,7 @@ function secondLoadDone(oldlistener, aRequest) // For as long as clone notification is synchronous, we can't test the // clone state reliably. - var listener = new ImageListener(null, checkAllCallbacks); + var listener = new ImageListener(null, checkSizeAndLoad); listener.synchronous = false; var outer = Cc["@mozilla.org/image/tools;1"].getService(Ci.imgITools) .createScriptedObserver(listener); diff --git a/image/test/unit/image_load_helpers.js b/image/test/unit/image_load_helpers.js index 13f723f32390..db9aec17c35f 100644 --- a/image/test/unit/image_load_helpers.js +++ b/image/test/unit/image_load_helpers.js @@ -15,7 +15,6 @@ const FRAME_UPDATE = 0x02; const FRAME_COMPLETE = 0x04; const LOAD_COMPLETE = 0x08; const DECODE_COMPLETE = 0x10; -const ALL_BITS = SIZE_AVAILABLE | FRAME_COMPLETE | DECODE_COMPLETE | LOAD_COMPLETE; // An implementation of imgIScriptedNotificationObserver with the ability to // call specified functions on onStartRequest and onStopRequest.