Closed Bug 557590 Opened 15 years ago Closed 15 years ago

code audit and create unit test plan for status.js

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mconnor, Assigned: philikon)

References

Details

Attachments

(1 file)

No description provided.
Flags: blocking-weave1.3+
Target Milestone: --- → 1.3
Whiteboard: [final]
Whiteboard: [final]
* We should default various values to default status here, rather than doing it in Service. * this.partial seems to be unused now. Test plan: * Import status.js * Check initial states are set up right: ** this.enforceBackoff = false; ** this.backoffInterval = 0; ** this.minimumNextSync = 0; ** this._engines = {}; ** this.partial = false; * login status: * set login to LOGIN_FAILED_NO_USERNAME / LOGIN_FAILED_NO_PASSWORD / LOGIN_FAILED_NO_PASSPHRASE ** this.service == CLIENT_NOT_CONFIGURED ** this.login == status set * set login to anything else other than LOGIN_SUCCEEDED ** this.service = LOGIN_FAILED; ** this.login == status set * set login to LOGIN_SUCCEEDED ** this.service == STATUS_OK; ** this.login == LOGIN_SUCCEEDED; * sync status: * set sync to any failure status ** this.service == SYNC_FAILED ** this.sync == status set * set sync to SYNC_SUCCEEDED ** this.service == STATUS_OK ** this.sync =- SYNC_SUCCEEDED * engines status * set some engine statuses ** Status.engines = ["testEng1", ENGINE_SUCCEEDED]; *** this.service = STATUS_OK *** this.engines["testEng1"] == ENGINE_SUCCEEDED; ** Status.engines = ["testEng2", ENGINE_DOWNLOAD_FAIL]; *** this.service = SYNC_FAILED_PARTIAL *** this.engines["testEng1"] == ENGINE_SUCCEEDED; *** this.engines["testEng2"] == ENGINE_DOWNLOAD_FAIL ** Status.engines = ["testEng3", ENGINE_SUCCEEDED]; *** this.service = SYNC_FAILED_PARTIAL *** this.engines["testEng1"] == ENGINE_SUCCEEDED; *** this.engines["testEng2"] == ENGINE_DOWNLOAD_FAIL *** this.engines["testEng3"] == ENGINE_SUCCEEDED; ** resetSync + this.sync = SYNC_SUCCEEDED; *** this.engines == {}; *** this.service = STATUS_OK; * set .partial to true, enforceBackoff to true, backoffInterval and minimumNextSync to non-zero * check values * call resetSync + resetBackoff * Check initial states are restored: ** this.enforceBackoff = false; ** this.backoffInterval = 0; ** this.minimumNextSync = 0; ** this._engines = {}; ** this.partial = false;
Over to Philipp!
Assignee: mconnor → philipp
Attachment #446020 - Flags: review?(mconnor) → review+
http://hg.mozilla.org/labs/weave/rev/8c7c4696cee2 Initialize status values in status.js + tests for status.js.
Status: NEW → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: 1.3 → 2.0
http://hg.mozilla.org/labs/weave/rev/8f00d6f65b1f (new url from hg magic) Initialize status values in status.js + tests for status.js.
Target Milestone: 2.0 → 1.4
Blocks: 569730
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: