Skip to content

Commit 014080f

Browse files
author
Cristian Tuns
committed
Backed out changeset 7ec1dad4bca4 (bug 1869836) for causing bc failures in browser_syncedtabs_firefoxview.js CLOSED TREE
1 parent d449cb7 commit 014080f

27 files changed

+152
-118
lines changed

browser/components/about/AboutRedirector.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ static const RedirEntry kRedirMap[] = {
7474
nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS |
7575
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
7676
nsIAboutModule::IS_SECURE_CHROME_UI},
77-
{"firefoxview", "chrome://browser/content/firefoxview/firefoxview.html",
77+
{"firefoxview",
78+
"chrome://browser/content/firefoxview/firefoxview-next.html",
7879
nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::IS_SECURE_CHROME_UI |
7980
nsIAboutModule::HIDE_FROM_ABOUTABOUT},
8081
{"policies", "chrome://browser/content/policies/aboutPolicies.html",

browser/components/about/components.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pages = [
1414
'logins',
1515
'loginsimportreport',
1616
'firefoxview',
17+
'firefoxview-next',
1718
'messagepreview',
1819
'newtab',
1920
'ion',

browser/components/firefoxview/firefoxview.html renamed to browser/components/firefoxview/firefoxview-next.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<link rel="localization" href="browser/migrationWizard.ftl" />
2222
<link
2323
rel="stylesheet"
24-
href="chrome://browser/content/firefoxview/firefoxview.css"
24+
href="chrome://browser/content/firefoxview/firefoxview-next.css"
2525
/>
2626
<script
2727
type="module"
@@ -113,6 +113,6 @@ <h1 slot="category-nav-header" data-l10n-id="firefoxview-page-title"></h1>
113113
</named-deck>
114114
</div>
115115
</main>
116-
<script src="chrome://browser/content/firefoxview/firefoxview.mjs"></script>
116+
<script src="chrome://browser/content/firefoxview/firefoxview-next.mjs"></script>
117117
</body>
118118
</html>

browser/components/firefoxview/history.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ class HistoryInView extends ViewPage {
531531
return html`
532532
<link
533533
rel="stylesheet"
534-
href="chrome://browser/content/firefoxview/firefoxview.css"
534+
href="chrome://browser/content/firefoxview/firefoxview-next.css"
535535
/>
536536
<link
537537
rel="stylesheet"

browser/components/firefoxview/jar.mn

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
browser.jar:
66
content/browser/firefoxview/card-container.css
77
content/browser/firefoxview/card-container.mjs
8-
content/browser/firefoxview/firefoxview.html
9-
content/browser/firefoxview/firefoxview.mjs
8+
content/browser/firefoxview/firefoxview-next.html
9+
content/browser/firefoxview/firefoxview-next.mjs
1010
content/browser/firefoxview/history.css
1111
content/browser/firefoxview/history.mjs
1212
content/browser/firefoxview/opentabs.mjs
1313
content/browser/firefoxview/view-opentabs.css
1414
content/browser/firefoxview/syncedtabs.mjs
1515
content/browser/firefoxview/view-syncedtabs.css
1616
content/browser/firefoxview/recentbrowsing.mjs
17-
content/browser/firefoxview/firefoxview.css
17+
content/browser/firefoxview/firefoxview-next.css
1818
content/browser/firefoxview/fxview-category-button.css
1919
content/browser/firefoxview/fxview-category-navigation.css
2020
content/browser/firefoxview/fxview-category-navigation.mjs

browser/components/firefoxview/moz.build

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ TESTING_JS_MODULES += [
1717
"tests/browser/FirefoxViewTestUtils.sys.mjs",
1818
]
1919

20-
BROWSER_CHROME_MANIFESTS += ["tests/browser/browser.toml"]
20+
BROWSER_CHROME_MANIFESTS += [
21+
"tests/browser/browser.toml",
22+
"tests/browser/firefoxview-next/browser.toml",
23+
]
2124

2225
MOCHITEST_CHROME_MANIFESTS += ["tests/chrome/chrome.toml"]

browser/components/firefoxview/opentabs.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ class OpenTabsInView extends ViewPage {
205205
/>
206206
<link
207207
rel="stylesheet"
208-
href="chrome://browser/content/firefoxview/firefoxview.css"
208+
href="chrome://browser/content/firefoxview/firefoxview-next.css"
209209
/>
210210
<div class="sticky-container bottom-fade">
211211
<h2
@@ -498,7 +498,7 @@ class OpenTabsInViewCard extends ViewPageContent {
498498
return html`
499499
<link
500500
rel="stylesheet"
501-
href="chrome://browser/content/firefoxview/firefoxview.css"
501+
href="chrome://browser/content/firefoxview/firefoxview-next.css"
502502
/>
503503
<card-container
504504
?preserveCollapseState=${this.recentBrowsing}
@@ -725,7 +725,7 @@ class OpenTabsContextMenu extends MozLitElement {
725725
return html`
726726
<link
727727
rel="stylesheet"
728-
href="chrome://browser/content/firefoxview/firefoxview.css"
728+
href="chrome://browser/content/firefoxview/firefoxview-next.css"
729729
/>
730730
<panel-list data-tab-type="opentabs">
731731
<panel-item

browser/components/firefoxview/recentbrowsing.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class RecentBrowsingInView extends ViewPage {
4040
return html`
4141
<link
4242
rel="stylesheet"
43-
href="chrome://browser/content/firefoxview/firefoxview.css"
43+
href="chrome://browser/content/firefoxview/firefoxview-next.css"
4444
/>
4545
<div class="sticky-container bottom-fade">
4646
<h2

browser/components/firefoxview/recentlyclosed.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ class RecentlyClosedTabsInView extends ViewPage {
329329
return html`
330330
<link
331331
rel="stylesheet"
332-
href="chrome://browser/content/firefoxview/firefoxview.css"
332+
href="chrome://browser/content/firefoxview/firefoxview-next.css"
333333
/>
334334
${when(
335335
!this.recentBrowsing,

browser/components/firefoxview/syncedtabs.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ class SyncedTabsInView extends ViewPage {
549549
/>`);
550550
renderArray.push(html` <link
551551
rel="stylesheet"
552-
href="chrome://browser/content/firefoxview/firefoxview.css"
552+
href="chrome://browser/content/firefoxview/firefoxview-next.css"
553553
/>`);
554554

555555
if (!this.recentBrowsing) {

browser/components/firefoxview/tests/browser/browser.toml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -37,34 +37,3 @@ skip-if = ["true"] # Bug 1851453
3737
["browser_tab_close_last_tab.js"]
3838

3939
["browser_tab_on_close_warning.js"]
40-
41-
["browser_firefoxview_paused.js"]
42-
43-
["browser_firefoxview_general_telemetry.js"]
44-
fail-if = ["a11y_checks"] # Bug 1854625 clicked .fxview-tab-row-secondary-button may not be focusable
45-
46-
["browser_firefoxview_navigation.js"]
47-
48-
["browser_firefoxview_virtual_list.js"]
49-
50-
["browser_history_firefoxview.js"]
51-
52-
["browser_opentabs_firefoxview.js"]
53-
fail-if = ["a11y_checks"] # Bugs 1854625 and 1872285 clicked .fxview-tab-row-secondary-button may not be focusable
54-
55-
["browser_opentabs_cards.js"]
56-
fail-if = ["a11y_checks"] # Bug 1858041 clicked .fxview-tab-row-main and div may not be focusable
57-
58-
["browser_opentabs_recency.js"]
59-
skip-if = [
60-
"os == 'win'",
61-
"os == 'mac' && verify"
62-
] # macos times out, see bug 1857293, skipped for windows, see bug 1858460
63-
64-
65-
["browser_recentlyclosed_firefoxview.js"]
66-
fail-if = ["a11y_checks"] # Bug 1854625 clicked button.fxview-tab-row-secondary-button and a.fxview-tab-row-main may not be focusable
67-
68-
["browser_syncedtabs_errors_firefoxview.js"]
69-
70-
["browser_syncedtabs_firefoxview.js"]

browser/components/firefoxview/tests/browser/browser_firefoxview.js

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -13,75 +13,3 @@ add_task(async function about_firefoxview_smoke_test() {
1313
ok(document.querySelector("named-deck"), "named-deck element exists");
1414
});
1515
});
16-
17-
add_task(async function test_aria_roles() {
18-
await withFirefoxView({}, async browser => {
19-
const { document } = browser.contentWindow;
20-
is(document.location.href, "about:firefoxview");
21-
22-
is(
23-
document.querySelector("main").getAttribute("role"),
24-
"application",
25-
"The main element has role='application'"
26-
);
27-
// Purge session history to ensure recently closed empty state is shown
28-
Services.obs.notifyObservers(null, "browser:purge-session-history");
29-
let recentlyClosedComponent = document.querySelector(
30-
"view-recentlyclosed[slot=recentlyclosed]"
31-
);
32-
await TestUtils.waitForCondition(
33-
() => recentlyClosedComponent.fullyUpdated
34-
);
35-
let recentlyClosedEmptyState = recentlyClosedComponent.emptyState;
36-
let descriptionEls = recentlyClosedEmptyState.descriptionEls;
37-
is(
38-
descriptionEls[1].querySelector("a").getAttribute("aria-details"),
39-
"card-container",
40-
"The link within the recently closed empty state has the expected 'aria-details' attribute."
41-
);
42-
43-
let syncedTabsComponent = document.querySelector(
44-
"view-syncedtabs[slot=syncedtabs]"
45-
);
46-
let syncedTabsEmptyState = syncedTabsComponent.emptyState;
47-
is(
48-
syncedTabsEmptyState.querySelector("button").getAttribute("aria-details"),
49-
"empty-container",
50-
"The button within the synced tabs empty state has the expected 'aria-details' attribute."
51-
);
52-
53-
// Test keyboard navigation from card-container summary
54-
// elements to links/buttons in empty states
55-
const tab = async shiftKey => {
56-
info(`Tab${shiftKey ? " + Shift" : ""}`);
57-
EventUtils.synthesizeKey("KEY_Tab", { shiftKey });
58-
};
59-
recentlyClosedComponent.cardEl.summaryEl.focus();
60-
ok(
61-
recentlyClosedComponent.cardEl.summaryEl.matches(":focus"),
62-
"Focus should be on the summary element within the recently closed card-container"
63-
);
64-
// Purge session history to ensure recently closed empty state is shown
65-
Services.obs.notifyObservers(null, "browser:purge-session-history");
66-
await TestUtils.waitForCondition(
67-
() => recentlyClosedComponent.fullyUpdated
68-
);
69-
await tab();
70-
ok(
71-
descriptionEls[1].querySelector("a").matches(":focus"),
72-
"Focus should be on the link within the recently closed empty state"
73-
);
74-
await tab();
75-
const shadowRoot =
76-
SpecialPowers.wrap(syncedTabsComponent).openOrClosedShadowRoot;
77-
ok(
78-
shadowRoot.querySelector("card-container").summaryEl.matches(":focus"),
79-
"Focus should be on summary element of the synced tabs card-container"
80-
);
81-
await tab();
82-
ok(
83-
syncedTabsEmptyState.querySelector("button").matches(":focus"),
84-
"Focus should be on button element of the synced tabs empty state"
85-
);
86-
});
87-
});
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[DEFAULT]
2+
support-files = [ "../head.js"]
3+
4+
["browser_firefoxview_next.js"]
5+
6+
["browser_firefoxview_paused.js"]
7+
8+
["browser_firefoxview_next_general_telemetry.js"]
9+
fail-if = ["a11y_checks"] # Bug 1854625 clicked .fxview-tab-row-secondary-button may not be focusable
10+
11+
["browser_firefoxview_next_navigation.js"]
12+
13+
["browser_firefoxview_virtual_list.js"]
14+
15+
["browser_history_firefoxview_next.js"]
16+
17+
["browser_opentabs_firefoxview_next.js"]
18+
fail-if = ["a11y_checks"] # Bugs 1854625 and 1872285 clicked .fxview-tab-row-secondary-button may not be focusable
19+
20+
["browser_opentabs_cards.js"]
21+
fail-if = ["a11y_checks"] # Bug 1858041 clicked .fxview-tab-row-main and div may not be focusable
22+
23+
["browser_opentabs_recency_next.js"]
24+
skip-if = [
25+
"os == 'win'",
26+
"os == 'mac' && verify"
27+
] # macos times out, see bug 1857293, skipped for windows, see bug 1858460
28+
29+
30+
["browser_recentlyclosed_firefoxview_next.js"]
31+
fail-if = ["a11y_checks"] # Bug 1854625 clicked button.fxview-tab-row-secondary-button and a.fxview-tab-row-main may not be focusable
32+
33+
["browser_syncedtabs_errors_firefoxview_next.js"]
34+
35+
["browser_syncedtabs_firefoxview_next.js"]
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
/* Any copyright is dedicated to the Public Domain.
2+
* http://creativecommons.org/publicdomain/zero/1.0/ */
3+
4+
/* import-globals-from ../head.js */
5+
6+
add_task(async function test_aria_roles() {
7+
await withFirefoxView({}, async browser => {
8+
const { document } = browser.contentWindow;
9+
is(document.location.href, "about:firefoxview");
10+
11+
is(
12+
document.querySelector("main").getAttribute("role"),
13+
"application",
14+
"The main element has role='application'"
15+
);
16+
// Purge session history to ensure recently closed empty state is shown
17+
Services.obs.notifyObservers(null, "browser:purge-session-history");
18+
let recentlyClosedComponent = document.querySelector(
19+
"view-recentlyclosed[slot=recentlyclosed]"
20+
);
21+
await TestUtils.waitForCondition(
22+
() => recentlyClosedComponent.fullyUpdated
23+
);
24+
let recentlyClosedEmptyState = recentlyClosedComponent.emptyState;
25+
let descriptionEls = recentlyClosedEmptyState.descriptionEls;
26+
is(
27+
descriptionEls[1].querySelector("a").getAttribute("aria-details"),
28+
"card-container",
29+
"The link within the recently closed empty state has the expected 'aria-details' attribute."
30+
);
31+
32+
let syncedTabsComponent = document.querySelector(
33+
"view-syncedtabs[slot=syncedtabs]"
34+
);
35+
let syncedTabsEmptyState = syncedTabsComponent.emptyState;
36+
is(
37+
syncedTabsEmptyState.querySelector("button").getAttribute("aria-details"),
38+
"empty-container",
39+
"The button within the synced tabs empty state has the expected 'aria-details' attribute."
40+
);
41+
42+
// Test keyboard navigation from card-container summary
43+
// elements to links/buttons in empty states
44+
const tab = async shiftKey => {
45+
info(`Tab${shiftKey ? " + Shift" : ""}`);
46+
EventUtils.synthesizeKey("KEY_Tab", { shiftKey });
47+
};
48+
recentlyClosedComponent.cardEl.summaryEl.focus();
49+
ok(
50+
recentlyClosedComponent.cardEl.summaryEl.matches(":focus"),
51+
"Focus should be on the summary element within the recently closed card-container"
52+
);
53+
// Purge session history to ensure recently closed empty state is shown
54+
Services.obs.notifyObservers(null, "browser:purge-session-history");
55+
await TestUtils.waitForCondition(
56+
() => recentlyClosedComponent.fullyUpdated
57+
);
58+
await tab();
59+
ok(
60+
descriptionEls[1].querySelector("a").matches(":focus"),
61+
"Focus should be on the link within the recently closed empty state"
62+
);
63+
await tab();
64+
const shadowRoot =
65+
SpecialPowers.wrap(syncedTabsComponent).openOrClosedShadowRoot;
66+
ok(
67+
shadowRoot.querySelector("card-container").summaryEl.matches(":focus"),
68+
"Focus should be on summary element of the synced tabs card-container"
69+
);
70+
await tab();
71+
ok(
72+
syncedTabsEmptyState.querySelector("button").matches(":focus"),
73+
"Focus should be on button element of the synced tabs empty state"
74+
);
75+
});
76+
});

browser/components/firefoxview/tests/browser/browser_firefoxview_general_telemetry.js renamed to browser/components/firefoxview/tests/browser/firefoxview-next/browser_firefoxview_next_general_telemetry.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* Any copyright is dedicated to the Public Domain.
22
* http://creativecommons.org/publicdomain/zero/1.0/ */
33

4+
/* import-globals-from ../head.js */
5+
46
const CARD_COLLAPSED_EVENT = [
57
["firefoxview_next", "card_collapsed", "card_container", undefined],
68
];
@@ -299,7 +301,6 @@ add_task(async function test_context_menu_private_window_telemetry() {
299301
});
300302

301303
add_task(async function test_context_menu_delete_from_history_telemetry() {
302-
await PlacesUtils.history.clear();
303304
await PlacesUtils.history.insert({
304305
url: URLs[0],
305306
title: "Example Domain 1",

browser/components/firefoxview/tests/browser/browser_firefoxview_navigation.js renamed to browser/components/firefoxview/tests/browser/firefoxview-next/browser_firefoxview_next_navigation.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* Any copyright is dedicated to the Public Domain.
22
* http://creativecommons.org/publicdomain/zero/1.0/ */
33

4+
/* import-globals-from ../head.js */
5+
46
const URL_BASE = `${getFirefoxViewURL()}#`;
57

68
function assertCorrectPage(document, name, event) {

browser/components/firefoxview/tests/browser/browser_firefoxview_paused.js renamed to browser/components/firefoxview/tests/browser/firefoxview-next/browser_firefoxview_paused.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* Any copyright is dedicated to the Public Domain.
22
* http://creativecommons.org/publicdomain/zero/1.0/ */
33

4+
/* import-globals-from ../head.js */
5+
46
const tabURL1 = "data:,Tab1";
57
const tabURL2 = "data:,Tab2";
68
const tabURL3 = "data:,Tab3";

browser/components/firefoxview/tests/browser/browser_firefoxview_virtual_list.js renamed to browser/components/firefoxview/tests/browser/firefoxview-next/browser_firefoxview_virtual_list.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/* Any copyright is dedicated to the Public Domain.
22
* http://creativecommons.org/publicdomain/zero/1.0/ */
33

4+
/* import-globals-from ../head.js */
5+
46
const VIRTUAL_LIST_ENABLED_PREF = "browser.firefox-view.virtual-list.enabled";
57

68
add_setup(async () => {

0 commit comments

Comments
 (0)