forked from mirrors/gecko-dev
Bug 1814281 - Make sure the pref is written before crash in cleanup test r=smaug
Another check to ensure the pref is there, in case it's not flushed to the disk yet (which would prevent the start cleanup from happening). This is still a speculative patch. Differential Revision: https://phabricator.services.mozilla.com/D204702
This commit is contained in:
parent
38263473fa
commit
aa13544052
1 changed files with 11 additions and 0 deletions
|
|
@ -46,6 +46,11 @@ class MovedOriginDirectoryCleanupTestCase(MarionetteTestCase):
|
|||
"""
|
||||
)
|
||||
|
||||
def read_prefs_file(self):
|
||||
pref_path = Path(self.marionette.profile_path) / "prefs.js"
|
||||
with open(pref_path) as f:
|
||||
return f.read()
|
||||
|
||||
def removeAllCookies(self):
|
||||
with self.marionette.using_context("chrome"):
|
||||
self.marionette.execute_script(
|
||||
|
|
@ -83,6 +88,12 @@ class MovedOriginDirectoryCleanupTestCase(MarionetteTestCase):
|
|||
message="privacy.sanitize.pending must include offlineApps",
|
||||
)
|
||||
|
||||
# Make sure the pref is written to the file
|
||||
Wait(self.marionette).until(
|
||||
lambda _: "offlineApps" in self.read_prefs_file(),
|
||||
message="prefs.js must include offlineApps",
|
||||
)
|
||||
|
||||
# Cleanup happens via Sanitizer.onStartup after restart
|
||||
self.marionette.restart(in_app=False)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue