Extend unit test coverage for action execution

RESOLVED FIXED in mozilla25

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Paolo, Assigned: Paolo)

Tracking

Trunk
mozilla25
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
I found a couple of unnoticed typos in the code of bug 852482, so I extended
the unit test coverage to cover the DownloadLegcaySaver code paths too.
(Assignee)

Comment 1

5 years ago
Created attachment 785006 [details] [diff] [review]
The patch
Attachment #785006 - Flags: review?(enndeakin)
(Assignee)

Comment 2

5 years ago
Created attachment 785015 [details] [diff] [review]
Updated patch

Added a test for content type on empty files.
Attachment #785006 - Attachment is obsolete: true
Attachment #785006 - Flags: review?(enndeakin)
Attachment #785015 - Flags: review?(enndeakin)

Comment 3

5 years ago
Comment on attachment 785015 [details] [diff] [review]
Updated patch

>         if (this.dontOpenFileAndFolder) {
>-          throw new Task.Result("chosen-app");
>+          throw new Task.Result(mimeInfo);

It's a bit odd to have a different result type thrown here, from the other case which returns a string "default-handler". If there is no other way (returning null for example), some documentation should be added to clarify the yielded values.
Attachment #785015 - Flags: review?(enndeakin) → review+
(Assignee)

Comment 4

5 years ago
Pushed to fx-team with the requested change:

https://hg.mozilla.org/integration/fx-team/rev/8c5218c1e1d1
https://hg.mozilla.org/mozilla-central/rev/8c5218c1e1d1
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.