Closed Bug 1783828 Opened 2 years ago Closed 2 years ago

Remove `skip-if = condprof` from toolkit/components/extensions/test/xpcshell/test_ext_permission_warnings.js

Categories

(WebExtensions :: General, task)

task

Tracking

(firefox105 fixed)

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: robwu, Assigned: robwu)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When I introduced a new permission (+schema change) in bug 1780747, the test_ext_permission_warnings.js test failed: https://bugzilla.mozilla.org/show_bug.cgi?id=1780747#c7

The error message reveals something interesting: although the patch had clearly introduced a new schema + permission warnings for the "declarativeNetRequest" permission, all (expected) error messages in the log output are not including the permission string.

My hypothesis for this observed error is that when the test is running in condprof mode, the "conditioned profile" includes a StartupCache entry of the extension schemas (see Schemas.loadCachedSchemas), and consequently any updates to extension schemas are not picked up in condprof tests. Apparently conditoned profiles are rebuilt once a day (according to bug 1769184), so I expect that after rebuilding the test will pass.
If my hypothesis is correct, then skipping the test for now, and re-enabling after 2 days should get the test running successfully.

xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_permission_warnings.js | Starting declarativeNetRequest_permission_with_warning
(xpcshell/head.js) | test declarativeNetRequest_permission_with_warning pending (2)
"Getting initial pref value for "extensions.dnr.enabled""
"Setting pref "extensions.dnr.enabled": true"
(xpcshell/head.js) | test run_next_test 6 finished (2)
"CONSOLE_MESSAGE: (info) 1659999155717 addons.webextension.{cf8e2f8f-0b6b-4994-bf63-7b02d0fa4170} WARN Loading extension '{cf8e2f8f-0b6b-4994-bf63-7b02d0fa4170}': Reading manifest: Warning processing permissions: Error processing permissions.0: Value "declarativeNetRequest" must either: must either [must either [be one of ["idle"], be one of ["menus.overrideContext"], be one of ["search"], be one of ["activeTab"], be one of ["cookies"], be one of ["scripting"], or be one of ["webRequest", "webRequestBlocking", "webRequestFilterResponse.serviceWorkerScript"]], must either [be one of ["mozillaAddons"], be one of ["normandyAddonStudy"], be one of ["urlbar"], be one of ["activityLog"], be one of ["networkStatus"], or be one of ["telemetry"]], be one of ["alarms", "storage", "unlimitedStorage"], be one of ["captivePortal"], be one of ["identity"], be one of ["menus", "contextMenus"], be one of ["geckoProfiler"], be one of ["contextualIdentities"], be one of ["dns"], or be one of ["theme"]], must either [must either [be one of ["idle"], be one of ["menus.overrideContext"], be one of ["search"], be one of ["activeTab"], be one of ["cookies"], be one of ["scripting"], or be one of ["webRequest", "webRequestBlocking", "webRequestFilterResponse.serviceWorkerScript"]], be one of ["clipboardRead", "clipboardWrite", "geolocation", "notifications"], be one of ["bookmarks"], be one of ["browsingData"], be one of ["devtools"], be one of ["find"], be one of ["history"], be one of ["pkcs11"], be one of ["sessions"], be one of ["tabs", "tabHide"], be one of ["topSites"], be one of ["browserSettings"], be one of ["downloads", "downloads.open"], be one of ["management"], be one of ["privacy"], be one of ["proxy"], be one of ["nativeMessaging"], or be one of ["webNavigation"]], or match the pattern /^experiments(\.\w+)+$/"
TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_permission_warnings.js | declarativeNetRequest_permission_with_warning - [declarativeNetRequest_permission_with_warning : 43] No origins by default in MV3 - [] deepEqual []
TEST-PASS | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_permission_warnings.js | declarativeNetRequest_permission_with_warning - [declarativeNetRequest_permission_with_warning : 45] No tests use optional_permissions - [] deepEqual []
TEST-UNEXPECTED-FAIL | xpcshell.ini:toolkit/components/extensions/test/xpcshell/test_ext_permission_warnings.js | declarativeNetRequest_permission_with_warning - [declarativeNetRequest_permission_with_warning : 498] Expected origins and permissions - {"permissions":[],"origins":[]} deepEqual {"origins":[],"permissions":["declarativeNetRequest"]}

Assignee: nobody → rob
Status: NEW → ASSIGNED
Pushed by rob@robwu.nl: https://hg.mozilla.org/integration/autoland/rev/f41e38c8c469 Re-enable test_ext_permission_warnings.js in condprof r=rpl
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch

Hypothesis confirmed - after waiting for condprof to have run with the application containing the code changes, the re-enabled test runs successfully. The follow-up to fix this more generally is in https://bugzilla.mozilla.org/show_bug.cgi?id=1769184#c3

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: