Closed Bug 2081770 Opened 1 month ago Closed 1 month ago

toolkit/components/extensions/test/xpcshell/test_ext_l10n.js fails with Android isolated process

Categories

(GeckoView :: General, defect)

All
Android
defect

Tracking

(firefox160 fixed)

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: jnicol, Assigned: jnicol)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

Rob's analysis from bug 1709961:

TEST-UNEXPECTED-FAIL | xpcshell-remote.toml:toolkit/components/extensions/test/xpcshell/test_ext_l10n.js | xpcshell return code: 0
TEST-UNEXPECTED-FAIL | xpcshell-remote.toml:toolkit/components/extensions/test/xpcshell/test_ext_l10n.js | test_l10n_dom - [test_l10n_dom : 93] Translation succeeded in privileged extension - false == true

The fuller error from the logs is:

"CONSOLE_MESSAGE: (warn) [JavaScript Warning: "Missing resource in locale en-US: test.ftl"]"
"CONSOLE_MESSAGE: (warn) [JavaScript Warning: "[fluent] Couldn't find a message: key" {file: "moz-extension://6b1173c2-4f9f-46b5-a8da-1a5dc3433e17/page.html" line: 0}]"
TEST-UNEXPECTED-FAIL | xpcshell-remote.toml:toolkit/components/extensions/test/xpcshell/test_ext_l10n.js | test_l10n_dom - [test_l10n_dom : 93] Translation succeeded in privileged extension - false == true

The test setup writes a file to disk and registers that local file with the expectation of it being available across child processes (the extension process in particular).

The test parent process currently writes the file in setup() to the TmpD, which isolated processes cannot read from.

I think we can work around this by making it an actual support file that xpcshell harness will copy to the device's test_root, which can actually be read by isolated processes.

The test setup wrote test.ftl into the profile's temporary directory,
which Android isolated processes are unable to read.

Instead, ship test.ftl in the test's data directory instead, which the
harness pushes to location that can be read by isolated processes. As
a result, the key must be made longer in order to satisfy fluent-lint.

Assignee: nobody → jnicol
Status: NEW → ASSIGNED
Pushed by jnicol@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a8b2280603b8 https://hg.mozilla.org/integration/autoland/rev/d78bb78535bb Fix test_ext_l10n.js with Android isolated process. r=extension-reviewers,fluent-reviewers,robwu,bolsson
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: