Closed Bug 1357975 Opened 7 years ago Closed 7 years ago

Permaorange in test_storage_manager_persisted.html when Gecko 55 merges to beta on 2017-06-12

Categories

(Core :: Storage: Quota Manager, defect)

55 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox-esr45 --- unaffected
firefox-esr52 --- unaffected
firefox53 --- unaffected
firefox54 --- unaffected
firefox55 + fixed

People

(Reporter: philor, Assigned: shawnjohnjr)

References

Details

Attachments

(2 files, 4 obsolete files)

Because dom.storageManager.enabled defaults to false on release builds, you need to set it in test_storage_manager_persisted.js to avoid having test_storage_manager_persisted.html time out because 'navigator.storage is undefined' like it did in the merge simulation https://treeherder.mozilla.org/logviewer.html#?job_id=92721338&repo=try (you should be able to test locally by just changing the version number in /config/milestone.txt from 55a1 to 55).

[Tracking Requested - why for this release]:

Merge permaorange, closed tree, delayed b1, sadness.
Flags: needinfo?(shuang)
Since file __dir__.ini was removed. Like Bug 1350732, we should set pref one by one.
Flags: needinfo?(shuang)
This was about the mochitest test_storage_manager_persisted.html, not those web-platform tests (there's a third storage wpt which will also fail, so this time I will add a __dir__.ini, which wasn't removed, it never existed).
After discussing with Shawn, we found that test_persist.js [1] failed in this try push, either. Besides, this failure is not related to this bug.

We think the reason is that we protected origin check when it is not relase or beta builds [2]. Thus, we should add a pref to test_persist.js to ensure it not running in beta or release builds. I'll file a bug for it since this issue is not related this bug.


[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=b9668396bb69fc202f0a7c1bbccdd9135818a40b&selectedJob=92728928
[2] http://searchfox.org/mozilla-central/source/dom/quota/ActorsParent.cpp#1974-2003
Comment on attachment 8859895 [details] [diff] [review]
Bug 1357975 - Set the pref to enable dom.storageManager for storage mochitests

I've modified version number config/milestone.txt from 55a1 to 55 and tested.
Attachment #8859895 - Flags: review?(jvarga)
We also need to take care of browser tests. I will provide an another patch.
Comment on attachment 8859895 [details] [diff] [review]
Bug 1357975 - Set the pref to enable dom.storageManager for storage mochitests

Review of attachment 8859895 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/quota/test/helpers.js
@@ +47,5 @@
>  
>    info("Running" +
>         (testScriptFilename ? " '" + testScriptFilename + "'" : ""));
>  
> +  info("Pushing preferences");

Just to be consistent with dom/indexedDB/test/helpers.js, this should go before clearAllDatabases() call.

You can now remove the pref from test_storage_manager_persist_allow.js and test_storage_manager_persist_deny.js since it's set in helpers.js
Attachment #8859895 - Flags: review?(jvarga)
Comment on attachment 8859905 [details] [diff] [review]
Bug 1357975 - Set the pref to enable dom.storageManager for storage mochitests

Review of attachment 8859905 [details] [diff] [review]:
-----------------------------------------------------------------

Nice
Attachment #8859905 - Flags: review?(jvarga) → review+
Comment on attachment 8859905 [details] [diff] [review]
Bug 1357975 - Set the pref to enable dom.storageManager for storage mochitests

Review of attachment 8859905 [details] [diff] [review]:
-----------------------------------------------------------------

Regarding the commit message, I think it would be better to say that we now set the pref in the helper, not in the tests.
(In reply to Jan Varga [:janv] from comment #11)
> Comment on attachment 8859905 [details] [diff] [review]
> Bug 1357975 - Set the pref to enable dom.storageManager for storage
> mochitests
> 
> Review of attachment 8859905 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Regarding the commit message, I think it would be better to say that we now
> set the pref in the helper, not in the tests.

I see. I will pay more attention to accuracy for commit messages next time.
Regarding browser test, we actually set pref in browser_permissionsPrompt.html.
So I think it's something else.
Looking into logs, I always saw "Failed to handle permission of type persistent-storage" in beta build.
Maybe it's related to frond-end changes. I will investigate a bit more.


GECKO(24449) | JavaScript error: file:///home/shawnjohnjr/code/mozilla-inbound/obj-x86_64-pc-linux-gnu/dist/bin/browser/components/nsBrowserGlue.js, line 2282: NS_ERROR_FAILURE: Failed to handle permission of type persistent-storage
6 INFO Console message: [JavaScript Error: "[Exception... "Failed to handle permission of type persistent-storage"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: file:///home/shawnjohnjr/code/mozilla-inbound/obj-x86_64-pc-linux-gnu/dist/bin/browser/components/nsBrowserGlue.js :: prompt :: line 2282"  data: no]"]
prompt@file:///home/shawnjohnjr/code/mozilla-inbound/obj-x86_64-pc-linux-gnu/dist/bin/browser/components/nsBrowserGlue.js:2282:15

7 INFO Console message: [JavaScript Error: "NS_ERROR_FAILURE: Failed to handle permission of type persistent-storage" {file: "file:///home/shawnjohnjr/code/mozilla-inbound/obj-x86_64-pc-linux-gnu/dist/bin/browser/components/nsBrowserGlue.js" line: 2282}]
We have to set pref "browser.storageManager.enabled" for enabling front-end features.
Front-end features are enabled only for nightly build. So to test prompts we have to enable pref no matter in beta.
Attachment #8859930 - Flags: review?(jvarga)
Comment on attachment 8859930 [details] [diff] [review]
Bug 1357975 - Set pref browser.storageManager.enabled for storage browser tests

Review of attachment 8859930 [details] [diff] [review]:
-----------------------------------------------------------------

Well, we could do this in browserHelpers.js, but it's not urgent.
Attachment #8859930 - Flags: review?(jvarga) → review+
Pushed by shuang@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4a0c24d90fc4
Set the pref to enable dom.storageManager in helpers.js, r=janv
https://hg.mozilla.org/integration/mozilla-inbound/rev/a485db46b96c
Set pref browser.storageManager.enabled for storage browser tests, r=janv
Assignee: nobody → shuang
Tracking 55+ for this permaorange, especially to avoid delays in B1.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: