Closed Bug 952259 Opened 6 years ago Closed 6 years ago
Basic automated tests for Metro sessionstore component
It would be useful to have some kind of testing that will ensure the desktop and metro sessionstore json files are compatible with one another. Some session store tests already exist for desktop, but not for Metro.
Whiteboard: [release28] [defect] p=5 → [beta28] [defect] p=5
I had to make some changes to SessionStore.js to make these tests pass: * If getBrowserState is called after a new tab is added but before its session data is initialized, it is possible to end up with a "null" value in the "tabs" array. This is probably fairly rare in regular use, but it happens very easily in automated tests. This patch filters out tabs that do not yet have any __SS_data. * While running tests, I found that the _orderedWindows array was never initialized. I suspect this was because shouldRestore was not set correctly when onWindowOpen ran. I'm not sure whether this ever happens in regular use or only in tests, but in any case this is fixed by initializing _orderedWindows unconditionally, and resetting it if we restore a session.
Attachment #8366823 - Flags: review?(msamuel)
Comment on attachment 8366823 [details] [diff] [review] part 1: getBrowserState tests and fixes Review of attachment 8366823 [details] [diff] [review]: ----------------------------------------------------------------- looks good! thanks for writing these tests :)
Attachment #8366823 - Flags: review?(msamuel) → review+
I'll land these and let this bug be resolved for now; we'll need more tests but I'll file separate bugs for them: https://hg.mozilla.org/integration/fx-team/rev/1c9aee553320
Whiteboard: [beta28] [defect] p=5 → [beta28] [defect] p=5 [fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [beta28] [defect] p=5 [fixed-in-fx-team] → [beta28] [defect] p=5
Target Milestone: --- → Firefox 29
Could you please give some guidance in order for the QA to verify this? Thanks!
This change should affect only automated tests, no manual verification needed.
Whiteboard: [beta28] [defect] p=5 → [beta28] [defect] p=5 [qa-]
You need to log in before you can comment on or make changes to this bug.