Closed Bug 766382 Opened 12 years ago Closed 12 years ago

webapps mochitests modify API call results

Categories

(Core Graveyard :: DOM: Apps, defect)

defect
Not set
normal

Tracking

(blocking-kilimanjaro:?, blocking-basecamp:-)

RESOLVED FIXED
mozilla16
blocking-kilimanjaro ?
blocking-basecamp -

People

(Reporter: myk, Assigned: myk)

References

Details

Attachments

(1 file)

The webapps mochitests modify the result values of the API calls they make, adding `status` properties that they then use to ensure the correct (success, error) callback was called.

That will stop working once we land the fix for bug 702369, which makes those result values immutable, as fabrice notes in bug 763847, comment 9.  It's also brittle, as it would break if we added a `status` property to those values in the API.

Thus those mochitests should stop modifying those result values and use a different mechanism to ensure the correct callback was called.

Here's a patch that does that.  I can imagine some further improvements to these tests, but this is the minimal change that addresses the issue.

This should block Basecamp/Kilimanjaro because it blocks a Basecamp/Kilimanjaro blocker (bug 702369).
Attachment #634649 - Flags: review?(jonas)
Comment on attachment 634649 [details] [diff] [review]
patch v1: stop modifying API call results

Erm, Jonas is away, and Felipe did the original review of this code, so switching the review request to Felipe.
Attachment #634649 - Flags: review?(jonas) → review?(felipc)
Attachment #634649 - Flags: review?(felipc) → review+
https://hg.mozilla.org/mozilla-central/rev/4a7c9600e845
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
blocking-basecamp: ? → -
Component: DOM: Mozilla Extensions → DOM: Apps
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: