Closed Bug 1209503 Opened 9 years ago Closed 6 years ago

[OTA update] Find a way to test the app.update.url pref/setting interaction.

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: janx, Assigned: janx)

References

Details

Attachments

(1 file)

As mentioned by Alex in bug 1206741 comment 7, the synchronization code between the "app.update.{url,channel}" prefs and corresponding settings in b2g/chrome/content/settings.js is crucial, and any breakage to it could mean no more updates for Firefox OS devices.

We should find a way to cover that code with tests in order to prevent such a breakage.
A possible way to cover this code would be to move it into a separate module, and then write tests around that module.
No longer blocks: 1206741
Depends on: 1206741
Sad: bug 1217490
Blocks: 1217490
(In reply to Alexandre LISSY :gerard-majax from comment #2)
> Sad: bug 1217490

Sad but unrelated to this bug, since the code worked as expected.

Still, it would be great to have tests for this code, so I'll move forward with the approach suggested in comment 1.
/!\ Unfinished and untested.

This is the approach I'd like to take in order to:

1) Extract the app.update.* pref/setting syncing code

2) Cover it with XPCshell unit tests

Maybe I can also try fixing the build-flag part of bug 1217490 in the same go.
Alex and Fabrice, do you agree with this general approach, or would you prefer something different? (e.g. write a /b2g/components/ module instead / write a more general settingshelpers.js file to sync prefs / cover all of settings.js with tests / something else)
Flags: needinfo?(lissyx+mozillians)
Flags: needinfo?(fabrice)
I don't really have a strong opinion on that.
Flags: needinfo?(lissyx+mozillians)
Thanks for looking at that Jan! I'm fine with your current overall approach - I don't want to send you down a rat hole to refactor the full settings.js. I have a slight preference for JS modules but that's a minor change to what you have (almost just s/loadSubscript/Cu.import).

Quickly looking at the code I don't think this will work as it is, but it's a WIP ;)
Flags: needinfo?(fabrice)
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: