Closed Bug 1389564 Opened 7 years ago Closed 7 years ago

Extend session store test to cover writing of restored sessions

Categories

(Firefox for Android Graveyard :: Testing, enhancement)

All
Android
enhancement
Not set
normal

Tracking

(firefox57 fixed)

RESOLVED FIXED
Firefox 57
Tracking Status
firefox57 --- fixed

People

(Reporter: JanH, Assigned: JanH)

References

Details

Attachments

(2 files)

We have a test that writes a basic session store file and tests that the tabs are restored properly and we have a test that opens some tabs and then checks the written session store file. We should extend this to test that a restored session is written properly as well.
Comment on attachment 8896617 [details] Bug 1389564 - Part 1 - Move common session test functionality into base class. https://reviewboard.mozilla.org/r/167900/#review173492
Attachment #8896617 - Flags: review?(gbrown) → review+
Comment on attachment 8896618 [details] Bug 1389564 - Part 2 - Test that restored (background) tabs are correctly written back to disk. https://reviewboard.mozilla.org/r/167664/#review173502 This looks good - thanks! Please run at least 5 times on try before check-in. ::: mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/SessionTest.java:399 (Diff revision 1) > } > } > > + protected void deleteProfileFile(String filename) { > + File fileToDelete = new File(mProfile, filename); > + fileToDelete.delete(); File.delete() returns a boolean -- worth checking and at least logging when there is an error. ::: mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSessionFilePreservation.java:26 (Diff revision 1) > + private static final String PREFS_NAME = "GeckoApp"; > + private static final String PREFS_ALLOW_STATE_BUNDLE = "allowStateBundle"; > + private final static int SESSION_TIMEOUT = 25000; > + > + @Override > + public void setActivityIntent(Intent intent) { Is this identical to the code in testSessionOOMRestore? You wouldn't want to move setActivityIntent to SessionTest, but you could move the body to a new helper function in SessionTest...just a suggestion.
Attachment #8896618 - Flags: review?(gbrown) → review+
Comment on attachment 8896618 [details] Bug 1389564 - Part 2 - Test that restored (background) tabs are correctly written back to disk. https://reviewboard.mozilla.org/r/167664/#review173502 > Is this identical to the code in testSessionOOMRestore? You wouldn't want to move setActivityIntent to SessionTest, but you could move the body to a new helper function in SessionTest...just a suggestion. I did move VerifyJSONCondition into the base class after all, so yes, I should do that here as well.
Pushed by mozilla@buttercookie.de: https://hg.mozilla.org/integration/autoland/rev/16f18931fd06 Part 1 - Move common session test functionality into base class. r=gbrown https://hg.mozilla.org/integration/autoland/rev/7d03c3a5bb4b Part 2 - Test that restored (background) tabs are correctly written back to disk. r=gbrown
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
:JanH -- Several intermittent-failure bugs have been filed against testSessionOOMSave since these changes: bug 1391761, bug 1394166, bug 1394275, bug 1394685. Perhaps something went wrong here?
Flags: needinfo?(jh+bugzilla)
Hmm, as far as testSessionOOMSave is concerned, all I did was move/extract some methods into the base class, so that shouldn't actually make a difference. Given that some of these crashes seem to be somewhere within the JVM, all bets might be off if we might be triggering some sort of OS bug? I've no idea, really...
Flags: needinfo?(jh+bugzilla)
Although there does seem to be something weird going on - now we've got bug 1395689, bug 1395690 and bug 1395687 as well. I'm not intimately familiar with our various Robocop tests to say how unique testSessionOOMSave really is, but what's probably characteristic about it is that we're opening three tabs and loading two URLs in each of them, and we're doing it the Robocop way, i.e. simulating user input. This means that we'll be entering and exiting editing mode quite bit and likewise loading and unloading the home panels relatively frequently. So an alternative theory could be that something (Something about the Photon redesign? Some recent Activity Stream changes?) related to that might be triggering the crashes and testSessionOOMSave happens to attract them because we're showing and hiding the home panels so frequently?
Depends on: 1402549
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: