I started hitting search issues with my change in D196494 and with other experiments to use more reusable components in about:preferences. We'll likely have to keep adding new elements to `searchWithinNode`, but changing `textNodeDescendants` to look for text nodes in the shadow DOM seems like a generally helpful change + gets the highlighting working properly.
Differential Revision: https://phabricator.services.mozilla.com/D197120
We intentionally turn off a11y_checks for the click updated, because it is send to send a focus on the URL Bar with the mouse, while other ways to focus it are accessible for users of assistive technology and keyboards, thus this test can be excluded from the accessibility tests.
Since this test is now expected to pass a11y_checks, we are also remiving the `fail-if` notation from the test manifest.
Differential Revision: https://phabricator.services.mozilla.com/D197433
The Firefox View provides a custom menu for Open Tab links. This menu is attempted to be clicked [twice](https://searchfox.org/mozilla-central/rev/6321fb8f7533456a62dfa2aa68ee0477a6c8f693/browser/components/firefoxview/tests/browser/firefoxview-next/browser_opentabs_firefoxview_next.js#134,238) in the test file `browser/components/firefoxview/tests/browser/firefoxview-next/browser_opentabs_firefoxview_next.js`. But since the `<panel-item>` itself has a role of `presentation` and is serving as a container for an accessible `<button role="menuitem">`, the automatic accessibility checks are flagging these clicks as ones on a non-accessible elements. We can update the test case to send a click on a `menuitem` itself to ensure the test is working as expected too, since the keyboard-only users and users of assistive technology would be activating the menuitem.
Since this would allow the a11y_checks to test an actual control and we expect these tests to pass, we need to update the `fail-if` notation in the test manifest to exclude the `panel-item` failure.
Differential Revision: https://phabricator.services.mozilla.com/D197727
The protections panel message should show once when the panel is first opened; after that it will be collapsed by default and can be shown again by clicking the "info" button on the panel
Messaging system previously sent the following pings on message show, and when the "learn more" link was clicked:
```
{“message_id”:“PROTECTIONS_PANEL_1",“event”:“IMPRESSION”,“addon_version”:“20231106094018",“locale”:“en-US”,“client_id”:“6fabd2de-3d0a-4b11-be4c-86b0ea1a1144",“browser_session_id”:“4b0f34b1-75ef-4704-907e-18d84e5187c3",“pingType”:“whats-new-panel”}
```
and
```
{“message_id”:“PROTECTIONS_PANEL_1",“event”:“CLICK”,“addon_version”:“20231106094018",“locale”:“en-US”,“client_id”:“6fabd2de-3d0a-4b11-be4c-86b0ea1a1144",“browser_session_id”:“4b0f34b1-75ef-4704-907e-18d84e5187c3",“pingType”:“whats-new-panel”}
```
This patch replaces these pings with 'RecordEvents' telemetry on the `protectionsPopup` object:
```
33153 security.ui.protectionspopup open protectionspopup_cfr impression {"message": "PROTECTIONS_PANEL_1"}
```
and
```
34932 security.ui.protectionspopup click protectionspopup_cfr
```
Differential Revision: https://phabricator.services.mozilla.com/D192968
There are some tests you can run to see how this looks, but I've also been verifying things locally by running this snippet in the browser toolbox:
```js
const { InfoBar } = ChromeUtils.import(
"resource://activity-stream/lib/InfoBar.jsm"
);
const { CFRMessageProvider } = ChromeUtils.importESModule(
"resource://activity-stream/lib/CFRMessageProvider.sys.mjs"
);
let message = (await CFRMessageProvider.getMessages()).find(
m => m.id === "INFOBAR_ACTION_86"
);
InfoBar.showInfoBarMessage(
BrowserWindowTracker.getTopWindow().gBrowser.selectedBrowser,
{
...message,
content: {
priority: window.gNotificationBox.PRIORITY_WARNING_HIGH,
...message.content,
},
},
{}
);
```
Depends on D194312
Differential Revision: https://phabricator.services.mozilla.com/D194313
Notification can be triggered locally via this snippet:
```js
BrowserSearch.removalOfSearchEngineNotificationBox("Google", "Foogle")
```
Depends on D189872
Differential Revision: https://phabricator.services.mozilla.com/D194312
This patch updates the `NotificationMessage` element in `notificationbox.js` so that it extends our newer `moz-message-bar` component instead of the deprecated `message-bar` component. Many of the changes are just dealing with the implications of making things async (so that we can ensure `moz-message-bar.mjs` gets imported). I tried to break out places where I modified related code and tests into separate patches to mitigate some of the review pain here.
This patch solves a longstanding issue where we were loading `in-content/common-shared.css` in the chrome since it gets used by the `message-bar` element. It also makes some small visual changes to our infobars (slight outline, icon colors, adds a bit of spacing).
Differential Revision: https://phabricator.services.mozilla.com/D189872
The protections panel message should show once when the panel is first opened; after that it will be collapsed by default and can be shown again by clicking the "info" button on the panel
Messaging system previously sent the following pings on message show, and when the "learn more" link was clicked:
```
{“message_id”:“PROTECTIONS_PANEL_1",“event”:“IMPRESSION”,“addon_version”:“20231106094018",“locale”:“en-US”,“client_id”:“6fabd2de-3d0a-4b11-be4c-86b0ea1a1144",“browser_session_id”:“4b0f34b1-75ef-4704-907e-18d84e5187c3",“pingType”:“whats-new-panel”}
```
and
```
{“message_id”:“PROTECTIONS_PANEL_1",“event”:“CLICK”,“addon_version”:“20231106094018",“locale”:“en-US”,“client_id”:“6fabd2de-3d0a-4b11-be4c-86b0ea1a1144",“browser_session_id”:“4b0f34b1-75ef-4704-907e-18d84e5187c3",“pingType”:“whats-new-panel”}
```
This patch replaces these pings with 'RecordEvents' telemetry on the `protectionsPopup` object:
```
33153 security.ui.protectionspopup open protectionspopup_cfr impression {"message": "PROTECTIONS_PANEL_1"}
```
and
```
34932 security.ui.protectionspopup click protectionspopup_cfr
```
Differential Revision: https://phabricator.services.mozilla.com/D192968
- removes all old View related files and assets
- removes legacy telemetry
- removes tests related to prefs that have since been removed
- remove `browser_all_files_referenced.js` exceptions added in Bug 1869833
Depends on D196093
Differential Revision: https://phabricator.services.mozilla.com/D196208
This is mostly removing code and tests related to reading/writing the cache file on macOS and updating of tests. Aside from that, the most notable part is the change to `setAttributionString` to automatically prepend `__MOZCUSTOM__` when writing an attribution code. This is mostly done to make things simpler and cleaner in the majority of the tests, but seeing as `getAttributionString` is also aware of it, it seems like a generally nicer way to do this.
Differential Revision: https://phabricator.services.mozilla.com/D197204
This function has been difficult to read for awhile. This patch cleans it up in preparation to adjust it for the removal of the cache file on macOS.
Differential Revision: https://phabricator.services.mozilla.com/D197203
While the new property is essential for matching SERPs, it is required so that the change
can be uplifted this change to other builds and avoid test_search_telemetry_config_validation.js
breaking when search-telemetry-v2.json is updated.
It is probably safer to update the schema on various builds, and only land the code changes
that depend on the update to search-telemetry-v2 on Nightly so that if we encounter an error
in search telemetry, its impact is minimal.
We can always update the schema to include the new property in required when all clients
have an updated search-telemetry-v2 dump.
Differential Revision: https://phabricator.services.mozilla.com/D197746
This introduces `mainview-with-header` attribute for panels that their
mainview should have a header (no matter where they appear); and
`has-custom-header` for panels that their panelview (not necessarily a
mainview) has a custom design for a header, one that headerText setter
can't anticipate in advance (due to UX needs that may arise).
If one of these attributes are set on the panel, this signals headerText
that the panelview's header should NOT be removed and that the markup
should be respected.
Differential Revision: https://phabricator.services.mozilla.com/D196671
This is mostly removing code and tests related to reading/writing the cache file on macOS and updating of tests. Aside from that, the most notable part is the change to `setAttributionString` to automatically prepend `__MOZCUSTOM__` when writing an attribution code. This is mostly done to make things simpler and cleaner in the majority of the tests, but seeing as `getAttributionString` is also aware of it, it seems like a generally nicer way to do this.
Differential Revision: https://phabricator.services.mozilla.com/D197204
This function has been difficult to read for awhile. This patch cleans it up in preparation to adjust it for the removal of the cache file on macOS.
Differential Revision: https://phabricator.services.mozilla.com/D197203
Adds another text-paste case to content analysis, this time for the
prompt() command, which is not covered by the other clipboard cases
in bug 1871135.
Differential Revision: https://phabricator.services.mozilla.com/D197018
The DoHConfig now listens for region change notification and
saves the new region in a pref. On the next initialization of
the DoH config we will use the saved pref to update the doh
region even if the pref was already set.
This should also work for testing (manually setting the value of the
pref) as long as no region changes happen.
Differential Revision: https://phabricator.services.mozilla.com/D195023