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)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
1.4
People
(Reporter: mconnor, Assigned: philikon)
References
Details
Attachments
(1 file)
4.77 KB,
patch
|
mconnor
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Reporter | ||
Updated•15 years ago
|
Flags: blocking-weave1.3+
Reporter | ||
Updated•15 years ago
|
Target Milestone: --- → 1.3
Reporter | ||
Updated•15 years ago
|
Whiteboard: [final]
Updated•15 years ago
|
Whiteboard: [final]
Reporter | ||
Comment 1•15 years ago
|
||
* 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;
Assignee | ||
Comment 3•15 years ago
|
||
Attachment #446020 -
Flags: review?(mconnor)
Reporter | ||
Updated•15 years ago
|
Attachment #446020 -
Flags: review?(mconnor) → review+
Assignee | ||
Updated•15 years ago
|
Keywords: checkin-needed
Comment 4•15 years ago
|
||
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
Comment 5•15 years ago
|
||
http://hg.mozilla.org/labs/weave/rev/8f00d6f65b1f (new url from hg magic)
Initialize status values in status.js + tests for status.js.
Updated•15 years ago
|
Target Milestone: 2.0 → 1.4
Updated•7 years ago
|
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.
Description
•