Closed Bug 1760047 Opened 3 years ago Closed 1 year ago

Migrate browser-siteProtections.js to use Fluent rather than .properties strings

Categories

(Firefox :: Protections UI, task, P3)

task

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: eemeli, Assigned: eemeli)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

browser-siteProtections.js is the only user for its strings in browser.properties, of which at least trackingProtection.icon.noTrackersDetectedTooltip is formatted during startup.

Migrating these strings to Fluent with the properties-to-ftl tool should be relatively straightforward.

Blocks: 1581212
No longer blocks: 1501881
Assignee: nobody → earo
Blocks: 1790189
No longer blocks: 1581212
Status: NEW → ASSIGNED
Component: General → Protections UI
Severity: -- → N/A
Priority: -- → P3
Blocks: 1834305

The PanelMultiView.showSubView() method needed to be made a bit more robust
for titles set by DOM localization rather than directly.

The following messages are dropped during the migration, as they are unused:

  • contentBlocking.trackersView.blocked.label
  • contentBlocking.cookiesView.firstParty.empty.label
  • contentBlocking.cookiesView.trackers.empty.label
  • contentBlocking.cookiesView.thirdParty.empty.label
  • contentBlocking.fingerprintersView.blocked.label
  • contentBlocking.cryptominersView.blocked.label
Attachment #9335480 - Attachment description: WIP: Bug 1760047 - Migrate browser-siteProtections.js to Fluent. r=#anti-tracking-reviewers! → Bug 1760047 - Migrate browser-siteProtections.js to Fluent. r=#anti-tracking-reviewers!
Pushed by earo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5e2344a050c6 Migrate browser-siteProtections.js to Fluent. r=anti-tracking-reviewers,fluent-reviewers,flod,bvandersloot

Backed out for causing bc failures on browser_protectionsUI_milestones.js.

[task 2023-06-05T13:01:52.025Z] 13:01:52     INFO - TEST-START | browser/base/content/test/protectionsUI/browser_protectionsUI_milestones.js
[task 2023-06-05T13:01:52.345Z] 13:01:52     INFO - GECKO(6060) | JavaScript error: resource:///modules/PanelMultiView.sys.mjs, line 1201: TypeError: can't access property "GetAvailRect", screen is null
[task 2023-06-05T13:02:37.029Z] 13:02:37     INFO - TEST-INFO | started process screenshot
[task 2023-06-05T13:02:37.099Z] 13:02:37     INFO - TEST-INFO | screenshot: exit 0
[task 2023-06-05T13:02:37.099Z] 13:02:37     INFO - Buffered messages logged at 13:01:52
[task 2023-06-05T13:02:37.099Z] 13:02:37     INFO - Entering setup bound 
[task 2023-06-05T13:02:37.099Z] 13:02:37     INFO - Leaving setup bound 
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - Entering test bound doTest
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - Console message: [JavaScript Error: "TypeError: can't access property "GetAvailRect", screen is null" {file: "resource:///modules/PanelMultiView.sys.mjs" line: 1201}]
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - _calculateMaxHeight@resource:///modules/PanelMultiView.sys.mjs:1201:5
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - handleEvent@resource:///modules/PanelMultiView.sys.mjs:1271:32
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - EventListener.handleEvent*connect@resource:///modules/PanelMultiView.sys.mjs:417:17
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - openPopup/this._openPopupPromise<@resource:///modules/PanelMultiView.sys.mjs:542:16
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - promise callback*openPopup@resource:///modules/PanelMultiView.sys.mjs:523:55
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - openPopup@resource:///modules/PanelMultiView.sys.mjs:276:47
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - showProtectionsPopup@chrome://browser/content/browser-siteProtections.js:2413:20
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - handleProtectionsButtonEvent@chrome://browser/content/browser-siteProtections.js:1740:10
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - onclick@chrome://browser/content/browser.xhtml:1:21
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - synthesizeMouseAtPoint@chrome://mochikit/content/tests/SimpleTest/EventUtils.js:642:13
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - synthesizeMouse@chrome://mochikit/content/tests/SimpleTest/EventUtils.js:545:10
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - synthesizeMouseAtCenter@chrome://mochikit/content/tests/SimpleTest/EventUtils.js:730:10
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - openProtectionsPanel@chrome://mochitests/content/browser/browser/base/content/test/protectionsUI/head.js:57:16
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - testToggleSwitch@chrome://mochitests/content/browser/browser/base/content/test/protectionsUI/browser_protectionsUI.js:50:9
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - async*handleTask@chrome://mochikit/content/browser-test.js:1131:26
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - _runTaskBasedTest@chrome://mochikit/content/browser-test.js:1203:18
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - async*Tester_execTest@chrome://mochikit/content/browser-test.js:1345:14
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - nextTest/<@chrome://mochikit/content/browser-test.js:1120:14
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1056:13
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - 
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - Buffered messages finished
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/protectionsUI/browser_protectionsUI_milestones.js | Test timed out - 
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - Not taking screenshot here: see the one that was previously logged
[task 2023-06-05T13:02:37.107Z] 13:02:37     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/protectionsUI/browser_protectionsUI_milestones.js | Uncaught exception received from previously timed out test bound doTest - popupshown listener not removed before the end of test
[task 2023-06-05T13:02:37.404Z] 13:02:37     INFO - GECKO(6060) | MEMORY STAT | vsize 1200MB | vsizeMaxContiguous 124MB | residentFast 387MB | heapAllocated 327MB
[task 2023-06-05T13:02:37.404Z] 13:02:37     INFO - TEST-OK | browser/base/content/test/protectionsUI/browser_protectionsUI_milestones.js | took 45375ms
[task 2023-06-05T13:02:37.420Z] 13:02:37     INFO - checking window state
[task 2023-06-05T13:02:37.435Z] 13:02:37     INFO - TEST-START | browser/base/content/test/protectionsUI/browser_protectionsUI_open_preferences.js
Flags: needinfo?(earo)

I was not able to replicate the issue locally or via try, so resubmitting the patch with longer test timeouts.

Flags: needinfo?(earo)
Pushed by earo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1c06f781a9cc Migrate browser-siteProtections.js to Fluent. r=anti-tracking-reviewers,fluent-reviewers,flod,bvandersloot

Backed out for causing OS X mochitests failures in browser_protectionsUI_milestones.js.

Flags: needinfo?(earo)

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:eemeli, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(francesco.lodolo)
Flags: needinfo?(earo)

Eemeli is out and, AFAIK, there are still problems with tests.

Flags: needinfo?(francesco.lodolo)

Sorry for the silence; been out on PTO. I've marked the patch as "Changes Planned" and will try to fix its test failures as soon as I can.

Flags: needinfo?(earo)
Pushed by earo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1ad8031a6677 Migrate browser-siteProtections.js to Fluent. r=anti-tracking-reviewers,fluent-reviewers,flod,bvandersloot
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: