Closed Bug 1430970 Opened 6 years ago Closed 6 years ago

FxAccounts internal mocking is broken

Categories

(Firefox :: Sync, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 59
Tracking Status
firefox59 --- fixed

People

(Reporter: eoger, Assigned: eoger)

References

Details

Attachments

(1 file)

Long term, I believe that we should remove the internal/Object.freeze(external) model since legacy addons are not around anymore.

In the meantime, I made a minimal test case [0] that reproduces how FxAccounts sets up a mocked internal [1].
If you execute that test you'll notice that "Original implementation" is printed to the console whereas it should be "Mocked implementation".

[0] https://pastebin.mozilla.org/9076108
[1] https://searchfox.org/mozilla-central/source/services/fxaccounts/FxAccounts.jsm#309-372
Assigning a reviewer once I confirm this patches fixes my testing problem in bug 1426306.
Comment on attachment 8943106 [details]
Bug 1430970 - Fix FxAccounts internal mocking.

https://reviewboard.mozilla.org/r/213406/#review219214

yay - I pushed back (and lost) against that cruft and will be happy to see it gone :)
Attachment #8943106 - Flags: review?(tchiovoloni)
Assignee: nobody → eoger
Status: NEW → ASSIGNED
Priority: -- → P1
Blocks: 1426306
Comment on attachment 8943106 [details]
Bug 1430970 - Fix FxAccounts internal mocking.

https://reviewboard.mozilla.org/r/213406/#review219530

This is silly, but your changes reduce the net silliness of this code.
Attachment #8943106 - Flags: review?(tchiovoloni) → review+
Pushed by eoger@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/16d1d6155d1d
Fix FxAccounts internal mocking. r=tcsc
https://hg.mozilla.org/mozilla-central/rev/16d1d6155d1d
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: