Last Comment Bug 766382 - webapps mochitests modify API call results
: webapps mochitests modify API call results
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Apps (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla16
Assigned To: Myk Melez [:myk] [@mykmelez]
:
: [:fabrice] Fabrice Desré
Mentors:
Depends on:
Blocks: 702369
  Show dependency treegraph
 
Reported: 2012-06-19 16:28 PDT by Myk Melez [:myk] [@mykmelez]
Modified: 2012-07-28 09:30 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
?
-


Attachments
patch v1: stop modifying API call results (10.24 KB, patch)
2012-06-19 16:28 PDT, Myk Melez [:myk] [@mykmelez]
felipc: review+
myk: checkin+
Details | Diff | Splinter Review

Description Myk Melez [:myk] [@mykmelez] 2012-06-19 16:28:51 PDT
Created attachment 634649 [details] [diff] [review]
patch v1: stop modifying API call results

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).
Comment 1 Myk Melez [:myk] [@mykmelez] 2012-06-19 16:35:36 PDT
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.
Comment 2 Myk Melez [:myk] [@mykmelez] 2012-06-20 09:54:43 PDT
Comment on attachment 634649 [details] [diff] [review]
patch v1: stop modifying API call results

https://hg.mozilla.org/integration/mozilla-inbound/rev/4a7c9600e845
Comment 3 Ed Morley [:emorley] 2012-06-21 04:06:55 PDT
https://hg.mozilla.org/mozilla-central/rev/4a7c9600e845

Note You need to log in before you can comment on or make changes to this bug.