Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Bug 804571: Support for canceling (pausing) system update downloads. #6724

Merged
merged 3 commits into from Dec 4, 2012

Conversation

Projects
None yet
2 participants
Contributor

marshall commented Nov 29, 2012

@etiennesegonzac etiennesegonzac commented on an outdated diff Nov 29, 2012

apps/system/test/unit/updatable_test.js
@@ -199,6 +199,15 @@ suite('system/Updatable', function() {
test('should call cancelDownload on the app', function() {
assert.isTrue(mockApp.mCancelCalled);
});
+
+ test('should send cancel message for system updates', function() {
+ subject = new SystemUpdatable(42);
+ subject._dispatchEvent = fakeDispatchEvent;
+ subject.cancelDownload();
+
+ assert.equal('update-download-cancel', lastDispatchedEvent.type);
+ assert.equal(subject, MockUpdateManager.mLastDownloadsRemoval);
@etiennesegonzac

etiennesegonzac Nov 29, 2012

Contributor

nit: if you break it in 2 tests we'll have it nicely documented from looking at the tests results that we're dispatching the event and removing it from the updates queue.

marshall added a commit that referenced this pull request Dec 4, 2012

Merge pull request #6724 from marshall/updateDownloadCancel
Bug 804571: Support for canceling (pausing) system update downloads.

@marshall marshall merged commit 9afa4dd into mozilla-b2g:master Dec 4, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment