Update On Wed Oct 26 20:50:35 CEST 2022
This commit is contained in:
parent
61df4bc60d
commit
53e02676a6
5283 changed files with 35327 additions and 27689 deletions
77
Cargo.lock
generated
77
Cargo.lock
generated
|
@ -900,7 +900,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "coreaudio-sys-utils"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/mozilla/cubeb-coreaudio-rs?rev=369c45504c45d74ebb19845506fb1596a471c7c9#369c45504c45d74ebb19845506fb1596a471c7c9"
|
||||
source = "git+https://github.com/mozilla/cubeb-coreaudio-rs?rev=93b5c01a131f65c83c11aeb317f4583405c5eb79#93b5c01a131f65c83c11aeb317f4583405c5eb79"
|
||||
dependencies = [
|
||||
"core-foundation-sys",
|
||||
"coreaudio-sys",
|
||||
|
@ -1146,7 +1146,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cubeb-coreaudio"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/mozilla/cubeb-coreaudio-rs?rev=369c45504c45d74ebb19845506fb1596a471c7c9#369c45504c45d74ebb19845506fb1596a471c7c9"
|
||||
source = "git+https://github.com/mozilla/cubeb-coreaudio-rs?rev=93b5c01a131f65c83c11aeb317f4583405c5eb79#93b5c01a131f65c83c11aeb317f4583405c5eb79"
|
||||
dependencies = [
|
||||
"atomic",
|
||||
"audio-mixer",
|
||||
|
@ -1199,6 +1199,20 @@ name = "dap_ffi"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"prio",
|
||||
"rand 0.7.999",
|
||||
"thin-vec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "dap_ffi-gtest"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"dap_ffi",
|
||||
"hex",
|
||||
"prio",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thin-vec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1521,7 +1535,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "error-support"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=d8503475f43dbf1d78eef4e23b0578d0fada3f39#d8503475f43dbf1d78eef4e23b0578d0fada3f39"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb#b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb"
|
||||
dependencies = [
|
||||
"log",
|
||||
]
|
||||
|
@ -2090,6 +2104,7 @@ name = "gkrust-gtest"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"bench-collections-gtest",
|
||||
"dap_ffi-gtest",
|
||||
"fog-gtest",
|
||||
"gecko-fuzz-targets",
|
||||
"gkrust-shared",
|
||||
|
@ -2170,6 +2185,7 @@ dependencies = [
|
|||
"rust_minidump_writer_linux",
|
||||
"static_prefs",
|
||||
"storage",
|
||||
"tabs",
|
||||
"tokio-reactor",
|
||||
"tokio-threadpool",
|
||||
"unic-langid",
|
||||
|
@ -2219,9 +2235,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "glean"
|
||||
version = "51.5.0"
|
||||
version = "51.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ce399400b17c541fa191ffa27073ec672544b1d67c69d18aa8768fde42712af"
|
||||
checksum = "2dfbbb336d8195ad56be852099319eaab3ba491bc7f38d18e7ebe02242a6be20"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"crossbeam-channel",
|
||||
|
@ -2239,9 +2255,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "glean-core"
|
||||
version = "51.5.0"
|
||||
version = "51.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f10d77ff81ef2feb11f06c4eab66da4a1f837b7d2ec1cb3117f30a2dbf4efb2d"
|
||||
checksum = "736924672efcb4cea229f024d75057fb2d0c37bb9544fdba6d8c09f6e6c3c766"
|
||||
dependencies = [
|
||||
"android_logger",
|
||||
"bincode",
|
||||
|
@ -2486,6 +2502,15 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hex"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hexf-parse"
|
||||
version = "0.2.1"
|
||||
|
@ -2640,7 +2665,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "interrupt-support"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=d8503475f43dbf1d78eef4e23b0578d0fada3f39#d8503475f43dbf1d78eef4e23b0578d0fada3f39"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb#b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"parking_lot 0.12.999",
|
||||
|
@ -3727,7 +3752,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "nss_build_common"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=d8503475f43dbf1d78eef4e23b0578d0fada3f39#d8503475f43dbf1d78eef4e23b0578d0fada3f39"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb#b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb"
|
||||
|
||||
[[package]]
|
||||
name = "nsstring"
|
||||
|
@ -4906,7 +4931,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "sql-support"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=d8503475f43dbf1d78eef4e23b0578d0fada3f39#d8503475f43dbf1d78eef4e23b0578d0fada3f39"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb#b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb"
|
||||
dependencies = [
|
||||
"ffi-support",
|
||||
"interrupt-support",
|
||||
|
@ -5088,7 +5113,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "sync-guid"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=d8503475f43dbf1d78eef4e23b0578d0fada3f39#d8503475f43dbf1d78eef4e23b0578d0fada3f39"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb#b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"rand 0.8.5",
|
||||
|
@ -5099,7 +5124,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "sync15"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=d8503475f43dbf1d78eef4e23b0578d0fada3f39#d8503475f43dbf1d78eef4e23b0578d0fada3f39"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb#b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"error-support",
|
||||
|
@ -5126,6 +5151,30 @@ dependencies = [
|
|||
"unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tabs"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb#b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"error-support",
|
||||
"interrupt-support",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"rusqlite",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"sql-support",
|
||||
"sync-guid",
|
||||
"sync15",
|
||||
"thiserror",
|
||||
"uniffi",
|
||||
"uniffi_build",
|
||||
"uniffi_macros",
|
||||
"url",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tap"
|
||||
version = "1.0.1"
|
||||
|
@ -5834,7 +5883,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
|||
[[package]]
|
||||
name = "viaduct"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=d8503475f43dbf1d78eef4e23b0578d0fada3f39#d8503475f43dbf1d78eef4e23b0578d0fada3f39"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb#b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb"
|
||||
dependencies = [
|
||||
"ffi-support",
|
||||
"log",
|
||||
|
@ -5990,7 +6039,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webext-storage"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=d8503475f43dbf1d78eef4e23b0578d0fada3f39#d8503475f43dbf1d78eef4e23b0578d0fada3f39"
|
||||
source = "git+https://github.com/mozilla/application-services?rev=b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb#b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb"
|
||||
dependencies = [
|
||||
"error-support",
|
||||
"ffi-support",
|
||||
|
|
11
Cargo.toml
11
Cargo.toml
|
@ -157,11 +157,12 @@ midir = { git = "https://github.com/mozilla/midir.git", rev = "e1b4dcb767f9e69af
|
|||
minidump_writer_linux = { git = "https://github.com/rust-minidump/minidump-writer.git", rev = "75ada456c92a429704691a85e1cb42fef8cafc0d" }
|
||||
|
||||
# application-services overrides to make updating them all simpler.
|
||||
interrupt-support = { git = "https://github.com/mozilla/application-services", rev = "d8503475f43dbf1d78eef4e23b0578d0fada3f39" }
|
||||
sql-support = { git = "https://github.com/mozilla/application-services", rev = "d8503475f43dbf1d78eef4e23b0578d0fada3f39" }
|
||||
sync15 = { git = "https://github.com/mozilla/application-services", rev = "d8503475f43dbf1d78eef4e23b0578d0fada3f39" }
|
||||
viaduct = { git = "https://github.com/mozilla/application-services", rev = "d8503475f43dbf1d78eef4e23b0578d0fada3f39" }
|
||||
webext-storage = { git = "https://github.com/mozilla/application-services", rev = "d8503475f43dbf1d78eef4e23b0578d0fada3f39" }
|
||||
interrupt-support = { git = "https://github.com/mozilla/application-services", rev = "b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb" }
|
||||
sql-support = { git = "https://github.com/mozilla/application-services", rev = "b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb" }
|
||||
sync15 = { git = "https://github.com/mozilla/application-services", rev = "b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb" }
|
||||
tabs = { git = "https://github.com/mozilla/application-services", rev = "b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb" }
|
||||
viaduct = { git = "https://github.com/mozilla/application-services", rev = "b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb" }
|
||||
webext-storage = { git = "https://github.com/mozilla/application-services", rev = "b09ffe23ee60a066176e5d7f9f2c6cd95c528ceb" }
|
||||
|
||||
# Patch mio 0.6 to use winapi 0.3 and miow 0.3, getting rid of winapi 0.2.
|
||||
# There is not going to be new version of mio 0.6, mio now being >= 0.7.11.
|
||||
|
|
|
@ -1675,12 +1675,30 @@ void LocalAccessible::Value(nsString& aValue) const {
|
|||
|
||||
double LocalAccessible::MaxValue() const {
|
||||
double checkValue = AttrNumericValue(nsGkAtoms::aria_valuemax);
|
||||
return IsNaN(checkValue) && !NativeHasNumericValue() ? 100 : checkValue;
|
||||
if (IsNaN(checkValue) && !NativeHasNumericValue()) {
|
||||
// aria-valuemax isn't present and this element doesn't natively provide a
|
||||
// maximum value. Use the ARIA default.
|
||||
const nsRoleMapEntry* roleMap = ARIARoleMap();
|
||||
if (roleMap && roleMap->role == roles::SPINBUTTON) {
|
||||
return UnspecifiedNaN<double>();
|
||||
}
|
||||
return 100;
|
||||
}
|
||||
return checkValue;
|
||||
}
|
||||
|
||||
double LocalAccessible::MinValue() const {
|
||||
double checkValue = AttrNumericValue(nsGkAtoms::aria_valuemin);
|
||||
return IsNaN(checkValue) && !NativeHasNumericValue() ? 0 : checkValue;
|
||||
if (IsNaN(checkValue) && !NativeHasNumericValue()) {
|
||||
// aria-valuemin isn't present and this element doesn't natively provide a
|
||||
// minimum value. Use the ARIA default.
|
||||
const nsRoleMapEntry* roleMap = ARIARoleMap();
|
||||
if (roleMap && roleMap->role == roles::SPINBUTTON) {
|
||||
return UnspecifiedNaN<double>();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return checkValue;
|
||||
}
|
||||
|
||||
double LocalAccessible::Step() const {
|
||||
|
@ -1690,6 +1708,12 @@ double LocalAccessible::Step() const {
|
|||
double LocalAccessible::CurValue() const {
|
||||
double checkValue = AttrNumericValue(nsGkAtoms::aria_valuenow);
|
||||
if (IsNaN(checkValue) && !NativeHasNumericValue()) {
|
||||
// aria-valuenow isn't present and this element doesn't natively provide a
|
||||
// current value. Use the ARIA default.
|
||||
const nsRoleMapEntry* roleMap = ARIARoleMap();
|
||||
if (roleMap && roleMap->role == roles::SPINBUTTON) {
|
||||
return UnspecifiedNaN<double>();
|
||||
}
|
||||
double minValue = MinValue();
|
||||
return minValue + ((MaxValue() - minValue) / 2);
|
||||
}
|
||||
|
@ -3258,13 +3282,12 @@ already_AddRefed<AccAttributes> LocalAccessible::BundleFieldsForCache(
|
|||
static_cast<HTMLComboboxAccessible*>(acc);
|
||||
HTMLComboboxListAccessible* list = combobox->List();
|
||||
LocalAccessible* currItem = combobox->SelectedOption();
|
||||
MOZ_ASSERT(list && currItem);
|
||||
// Preserve hittesting order by adding the item, then
|
||||
// the list, and finally the combobox itself.
|
||||
if (inViewAccs.EnsureInserted(currItem)) {
|
||||
if (currItem && inViewAccs.EnsureInserted(currItem)) {
|
||||
viewportCache.AppendElement(currItem->ID());
|
||||
}
|
||||
if (inViewAccs.EnsureInserted(list)) {
|
||||
if (list && inViewAccs.EnsureInserted(list)) {
|
||||
viewportCache.AppendElement(list->ID());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -631,6 +631,11 @@ mozilla::ipc::IPCResult DocAccessibleParent::RecvCache(
|
|||
|
||||
if (aUpdateType == CacheUpdateType::Initial && !aData.IsEmpty()) {
|
||||
RemoteAccessible* target = GetAccessible(aData.ElementAt(0).ID());
|
||||
if (!target) {
|
||||
MOZ_ASSERT_UNREACHABLE("No remote found for initial cache push!");
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
ProxyShowHideEvent(target, target->RemoteParent(), true, false);
|
||||
|
||||
if (nsCoreUtils::AccEventObserversExist()) {
|
||||
|
|
|
@ -24,6 +24,14 @@
|
|||
testValue(`${role}_vtvn`, "juice", 6, 0, 100, 0);
|
||||
}
|
||||
|
||||
testValue("spinbutton_default", "", 0, 0, 0, 0);
|
||||
testValue("spinbutton_min1max50", "", 0, 1, 50, 0);
|
||||
testValue("spinbutton_max200", "", 0, 0, 200, 0);
|
||||
testValue("spinbutton_min10", "", 0, 10, 0, 0);
|
||||
testValue("spinbutton_vt", "juice", 0, 0, 0, 0);
|
||||
testValue("spinbutton_vn", "6", 6, 0, 0, 0);
|
||||
testValue("spinbutton_vtvn", "juice", 6, 0, 0, 0);
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
|
@ -63,6 +71,15 @@
|
|||
<div id="scrollbar_vt" role="scrollbar" aria-valuetext="juice">orange scrollbar</div>
|
||||
<div id="scrollbar_vn" role="scrollbar" aria-valuenow="6">chocolate scrollbar</div>
|
||||
<div id="scrollbar_vtvn" role="scrollbar" aria-valuetext="juice" aria-valuenow="6">apple scrollbar</div>
|
||||
|
||||
<!-- ARIA spinbuttons -->
|
||||
<div id="spinbutton_default" role="spinbutton">vanilla spinbutton</div>
|
||||
<div id="spinbutton_min1max50" role="spinbutton" aria-valuemin="1" aria-valuemax="50">banana spinbutton</div>
|
||||
<div id="spinbutton_max200" role="spinbutton" aria-valuemax="200">cherry spinbutton</div>
|
||||
<div id="spinbutton_min10" role="spinbutton" aria-valuemin="10">strawberry spinbutton</div>
|
||||
<div id="spinbutton_vt" role="spinbutton" aria-valuetext="juice">orange spinbutton</div>
|
||||
<div id="spinbutton_vn" role="spinbutton" aria-valuenow="6">chocolate spinbutton</div>
|
||||
<div id="spinbutton_vtvn" role="spinbutton" aria-valuetext="juice" aria-valuenow="6">apple spinbutton</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -144,7 +144,7 @@ pref("app.update.notifyDuringDownload", false);
|
|||
// default value to migrate to the new location that this data is now stored
|
||||
// (which is in a file in the update directory). Because of this, this pref
|
||||
// should no longer be used directly. Instead, getAppUpdateAutoEnabled and
|
||||
// getAppUpdateAutoEnabled from UpdateUtils.jsm should be used.
|
||||
// getAppUpdateAutoEnabled from UpdateUtils.sys.mjs should be used.
|
||||
#ifndef XP_WIN
|
||||
pref("app.update.auto", true);
|
||||
#endif
|
||||
|
@ -1649,7 +1649,7 @@ pref("browser.aboutwelcome.templateMR", true);
|
|||
pref("browser.messaging-system.whatsNewPanel.enabled", true);
|
||||
|
||||
// Experiment Manager
|
||||
// See Console.jsm LOG_LEVELS for all possible values
|
||||
// See Console.sys.mjs LOG_LEVELS for all possible values
|
||||
pref("messaging-system.log", "warn");
|
||||
pref("messaging-system.rsexperimentloader.enabled", true);
|
||||
pref("messaging-system.rsexperimentloader.collection_id", "nimbus-desktop-experiments");
|
||||
|
@ -1941,7 +1941,7 @@ pref("browser.contentblocking.report.show_mobile_app", true);
|
|||
pref("browser.send_to_device_locales", "de,en-GB,en-US,es-AR,es-CL,es-ES,es-MX,fr,id,pl,pt-BR,ru,zh-TW");
|
||||
|
||||
// Avoid advertising in certain regions. Comma separated string of two letter ISO 3166-1 country codes.
|
||||
// We're currently blocking all of Ukraine (ua), but would prefer to block just Crimea (ua-43). Currently, the Mozilla Location Service APIs used by Region.jsm only exposes the country, not the subdivision.
|
||||
// We're currently blocking all of Ukraine (ua), but would prefer to block just Crimea (ua-43). Currently, the Mozilla Location Service APIs used by Region.sys.mjs only exposes the country, not the subdivision.
|
||||
pref("browser.vpn_promo.disallowed_regions", "ae,by,cn,cu,iq,ir,kp,om,ru,sd,sy,tm,tr,ua");
|
||||
|
||||
// Default to enabling VPN promo messages to be shown when specified and allowed
|
||||
|
|
|
@ -20,6 +20,13 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
DownloadUtils: "resource://gre/modules/DownloadUtils.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(
|
||||
this,
|
||||
"AUS",
|
||||
"@mozilla.org/updates/update-service;1",
|
||||
"nsIApplicationUpdateService"
|
||||
);
|
||||
|
||||
var UPDATING_MIN_DISPLAY_TIME_MS = 1500;
|
||||
|
||||
var gAppUpdater;
|
||||
|
@ -101,9 +108,17 @@ appUpdater.prototype = {
|
|||
case AppUpdater.STATUS.DOWNLOADING: {
|
||||
let downloadStatus = document.getElementById("downloadStatus");
|
||||
if (!args.length) {
|
||||
// Very early in the DOWNLOADING state, `selectedPatch` may not be
|
||||
// available yet. But this function will be called again when it is
|
||||
// available. A `maxSize < 0` indicates that the max size is not yet
|
||||
// available.
|
||||
let maxSize = -1;
|
||||
if (this.update.selectedPatch) {
|
||||
maxSize = this.update.selectedPatch.size;
|
||||
}
|
||||
downloadStatus.textContent = DownloadUtils.getTransferTotal(
|
||||
0,
|
||||
this.update.selectedPatch.size
|
||||
maxSize
|
||||
);
|
||||
this.selectPanel("downloading");
|
||||
} else {
|
||||
|
@ -160,6 +175,9 @@ appUpdater.prototype = {
|
|||
case AppUpdater.STATUS.INTERNAL_ERROR:
|
||||
this.selectPanel("internalError");
|
||||
break;
|
||||
case AppUpdater.STATUS.NEVER_CHECKED:
|
||||
this.selectPanel("checkForUpdates");
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -215,7 +233,7 @@ appUpdater.prototype = {
|
|||
* Check for updates
|
||||
*/
|
||||
checkForUpdates() {
|
||||
this._appUpdater.checkForUpdates();
|
||||
this._appUpdater.check();
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -223,7 +241,7 @@ appUpdater.prototype = {
|
|||
* which is presented after the download has been downloaded.
|
||||
*/
|
||||
buttonRestartAfterDownload() {
|
||||
if (!this._appUpdater.isReadyForRestart) {
|
||||
if (AUS.currentState != Ci.nsIApplicationUpdateService.STATE_PENDING) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -265,6 +283,6 @@ appUpdater.prototype = {
|
|||
* Starts the download of an update mar.
|
||||
*/
|
||||
startDownload() {
|
||||
this._appUpdater.startDownload();
|
||||
this._appUpdater.allowUpdateDownload();
|
||||
},
|
||||
};
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<!-- This HBOX is duplicated below with class="update" -->
|
||||
<hbox align="baseline">
|
||||
<label id="version"/>
|
||||
<label id="releasenotes" is="text-link" hidden="true" flex="1" data-l10n-id="releaseNotes-link"/>
|
||||
<label id="releasenotes" is="text-link" hidden="true" data-l10n-id="releaseNotes-link"/>
|
||||
</hbox>
|
||||
#endif
|
||||
|
||||
|
@ -106,7 +106,7 @@
|
|||
<!-- This HBOX is duplicated above without class="update" -->
|
||||
<hbox align="baseline">
|
||||
<label id="version" class="update"/>
|
||||
<label id="releasenotes" is="text-link" hidden="true" flex="1" data-l10n-id="releaseNotes-link"/>
|
||||
<label id="releasenotes" is="text-link" hidden="true" data-l10n-id="releaseNotes-link"/>
|
||||
</hbox>
|
||||
<description class="text-blurb">
|
||||
<label is="text-link" onclick="openHelpLink('firefox-help')" data-l10n-id="aboutdialog-help-user"/>
|
||||
|
|
|
@ -1453,7 +1453,7 @@ var gUnifiedExtensions = {
|
|||
if (!aBrowser[attr]) {
|
||||
// A hacky way of setting the popup anchor outside the usual url bar
|
||||
// icon box, similar to how it was done for CFR.
|
||||
// See: https://searchfox.org/mozilla-central/rev/847b64cc28b74b44c379f9bff4f415b97da1c6d7/toolkit/modules/PopupNotifications.jsm#42
|
||||
// See: https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/toolkit/modules/PopupNotifications.sys.mjs#40
|
||||
aBrowser[attr] = aWindow.document.getElementById(
|
||||
anchorID
|
||||
// Anchor on the toolbar icon to position the popup right below the
|
||||
|
|
|
@ -400,7 +400,8 @@
|
|||
<menu id="browserToolsMenu" data-l10n-id="menu-tools-browser-tools">
|
||||
<menupopup id="menuWebDeveloperPopup">
|
||||
<menuitem id="menu_taskManager"
|
||||
oncommand="switchToTabHavingURI('about:processes', true)"
|
||||
key="key_aboutProcesses"
|
||||
command="View:AboutProcesses"
|
||||
data-l10n-id="menu-tools-task-manager"/>
|
||||
<menuitem id="menu_pageSource"
|
||||
key="key_viewSource"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<command id="cmd_handleBackspace" oncommand="BrowserHandleBackspace();" />
|
||||
<command id="cmd_handleShiftBackspace" oncommand="BrowserHandleShiftBackspace();" />
|
||||
|
||||
<command id="cmd_newNavigatorTab" oncommand="BrowserOpenTab(event);"/>
|
||||
<command id="cmd_newNavigatorTab" oncommand="BrowserOpenTab({ event });"/>
|
||||
<command id="cmd_newNavigatorTabNoEvent" oncommand="BrowserOpenTab();"/>
|
||||
<command id="Browser:OpenFile" oncommand="BrowserOpenFileWindow();"/>
|
||||
<command id="Browser:SavePage" oncommand="saveBrowser(gBrowser.selectedBrowser);"/>
|
||||
|
@ -39,6 +39,7 @@
|
|||
<command id="cmd_toggleOfflineStatus" oncommand="BrowserOffline.toggleOfflineStatus();"/>
|
||||
<command id="cmd_quitApplication" oncommand="goQuitApplication(event)"/>
|
||||
|
||||
<command id="View:AboutProcesses" oncommand="switchToTabHavingURI('about:processes', true)"/>
|
||||
<command id="View:PageSource" oncommand="BrowserViewSource(window.gBrowser.selectedBrowser);"/>
|
||||
<command id="View:PageInfo" oncommand="BrowserPageInfo();"/>
|
||||
<command id="View:FullScreen" oncommand="BrowserFullScreen();"/>
|
||||
|
@ -241,6 +242,7 @@
|
|||
|
||||
<key data-l10n-id="nav-reload-shortcut" command="Browser:Reload" modifiers="accel" id="key_reload"/>
|
||||
<key data-l10n-id="nav-reload-shortcut" command="Browser:ReloadSkipCache" modifiers="accel,shift" id="key_reload_skip_cache"/>
|
||||
<key id="key_aboutProcesses" command="View:AboutProcesses" keycode="VK_ESCAPE" modifiers="shift"/>
|
||||
<key id="key_viewSource" data-l10n-id="page-source-shortcut" command="View:PageSource" modifiers="accel"/>
|
||||
#ifdef XP_MACOSX
|
||||
<key id="key_viewSourceSafari" data-l10n-id="page-source-shortcut-safari" command="View:PageSource" modifiers="accel,alt"/>
|
||||
|
|
|
@ -161,6 +161,7 @@ class ProtectionCategory {
|
|||
return false;
|
||||
}
|
||||
this.categoryItem.classList.toggle("blocked", this.enabled);
|
||||
this.categoryItem.classList.toggle("subviewbutton-nav", this.enabled);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1631,6 +1632,10 @@ var gProtectionsHandler = {
|
|||
"notFound",
|
||||
!blocker.isDetected(event)
|
||||
);
|
||||
blocker.categoryItem.classList.toggle(
|
||||
"subviewbutton-nav",
|
||||
blocker.isDetected(event)
|
||||
);
|
||||
}
|
||||
|
||||
// And the popup attributes:
|
||||
|
|
|
@ -1172,6 +1172,7 @@ toolbarpaletteitem[place="palette"] > #downloads-button[indicator] > .toolbarbut
|
|||
#customization-container {
|
||||
-moz-box-orient: horizontal;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
#customization-container:not([hidden]) {
|
||||
|
@ -1192,7 +1193,7 @@ toolbarpaletteitem[place="palette"] > #downloads-button[indicator] > .toolbarbut
|
|||
}
|
||||
|
||||
#customization-panelHolder > #widget-overflow-fixed-list {
|
||||
flex: 1 1 auto; /* Grow within the available space, and allow ourselves to shrink */
|
||||
flex: 1; /* Grow within the available space, and allow ourselves to shrink */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
|
@ -1208,7 +1209,7 @@ toolbarpaletteitem[place="palette"] > #downloads-button[indicator] > .toolbarbut
|
|||
}
|
||||
|
||||
#customization-panelWrapper {
|
||||
flex: 1 1 auto;
|
||||
flex: 1;
|
||||
height: 0; /* Don't let my contents affect ancestors' content-based sizing */
|
||||
align-items: end; /* align to the end on the cross-axis (affects arrow) */
|
||||
}
|
||||
|
|
|
@ -2947,9 +2947,9 @@ function openLocation(event) {
|
|||
);
|
||||
}
|
||||
|
||||
function BrowserOpenTab(event) {
|
||||
let where = "tab";
|
||||
function BrowserOpenTab({ event, url = BROWSER_NEW_TAB_URL } = {}) {
|
||||
let relatedToCurrent = false;
|
||||
let where = "tab";
|
||||
|
||||
if (event) {
|
||||
where = whereToOpenLink(event, false, true);
|
||||
|
@ -2980,7 +2980,7 @@ function BrowserOpenTab(event) {
|
|||
Services.obs.notifyObservers(
|
||||
{
|
||||
wrappedJSObject: new Promise(resolve => {
|
||||
openTrustedLinkIn(BROWSER_NEW_TAB_URL, where, {
|
||||
openTrustedLinkIn(url, where, {
|
||||
relatedToCurrent,
|
||||
resolveOnNewTabCreated: resolve,
|
||||
});
|
||||
|
@ -3643,8 +3643,8 @@ var browserDragAndDrop = {
|
|||
return Services.droppedLinkHandler.getTriggeringPrincipal(aEvent);
|
||||
},
|
||||
|
||||
getCSP(aEvent) {
|
||||
return Services.droppedLinkHandler.getCSP(aEvent);
|
||||
getCsp(aEvent) {
|
||||
return Services.droppedLinkHandler.getCsp(aEvent);
|
||||
},
|
||||
|
||||
validateURIsForDrop(aEvent, aURIs) {
|
||||
|
@ -3737,7 +3737,7 @@ var newTabButtonObserver = {
|
|||
|
||||
let where = aEvent.shiftKey ? "tabshifted" : "tab";
|
||||
let triggeringPrincipal = browserDragAndDrop.getTriggeringPrincipal(aEvent);
|
||||
let csp = browserDragAndDrop.getCSP(aEvent);
|
||||
let csp = browserDragAndDrop.getCsp(aEvent);
|
||||
for (let link of links) {
|
||||
if (link.url) {
|
||||
let data = await UrlbarUtils.getShortcutOrURIAndPostData(link.url);
|
||||
|
@ -3774,7 +3774,7 @@ var newWindowButtonObserver = {
|
|||
}
|
||||
|
||||
let triggeringPrincipal = browserDragAndDrop.getTriggeringPrincipal(aEvent);
|
||||
let csp = browserDragAndDrop.getCSP(aEvent);
|
||||
let csp = browserDragAndDrop.getCsp(aEvent);
|
||||
for (let link of links) {
|
||||
if (link.url) {
|
||||
let data = await UrlbarUtils.getShortcutOrURIAndPostData(link.url);
|
||||
|
@ -9079,8 +9079,7 @@ const SafeBrowsingNotificationBox = {
|
|||
*/
|
||||
class TabDialogBox {
|
||||
static _containerFor(browser) {
|
||||
// Return the .browserContainer
|
||||
return browser.parentNode.parentNode;
|
||||
return browser.closest(".browserContainer, .webextension-popup-stack");
|
||||
}
|
||||
|
||||
constructor(browser) {
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
<link rel="localization" href="browser/protectionsPanel.ftl"/>
|
||||
<link rel="localization" href="browser/appmenu.ftl"/>
|
||||
<link rel="localization" href="browser/panelUI.ftl"/>
|
||||
<link rel="localization" href="preview/identityCredentialNotification.ftl"/>
|
||||
<link rel="localization" href="preview/interventions.ftl"/>
|
||||
<link rel="localization" href="browser/sidebarMenu.ftl"/>
|
||||
<link rel="localization" href="browser/allTabsMenu.ftl"/>
|
||||
|
|
|
@ -302,6 +302,8 @@
|
|||
data-l10n-id="urlbar-midi-notification-anchor"/>
|
||||
<image id="webauthn-notification-icon" class="notification-anchor-icon" role="button"
|
||||
data-l10n-id="urlbar-web-authn-anchor"/>
|
||||
<image id="identity-credential-notification-icon" class="notification-anchor-icon" role="button"
|
||||
data-l10n-id="urlbar-identity-credential-anchor"/>
|
||||
<image id="storage-access-notification-icon" class="notification-anchor-icon storage-access-icon" role="button"
|
||||
data-l10n-id="urlbar-storage-access-anchor"/>
|
||||
</box>
|
||||
|
|
|
@ -931,70 +931,71 @@ function makePreview(row) {
|
|||
isBG) &&
|
||||
isProtocolAllowed
|
||||
) {
|
||||
// We need to wait for the image to finish loading before using width & height
|
||||
newImage.addEventListener(
|
||||
"loadend",
|
||||
function() {
|
||||
physWidth = newImage.width || 0;
|
||||
physHeight = newImage.height || 0;
|
||||
function loadOrErrorListener() {
|
||||
newImage.removeEventListener("load", loadOrErrorListener);
|
||||
newImage.removeEventListener("error", loadOrErrorListener);
|
||||
physWidth = newImage.width || 0;
|
||||
physHeight = newImage.height || 0;
|
||||
|
||||
// "width" and "height" attributes must be set to newImage,
|
||||
// even if there is no "width" or "height attribute in item;
|
||||
// otherwise, the preview image cannot be displayed correctly.
|
||||
// Since the image might have been loaded out-of-process, we expect
|
||||
// the item to tell us its width / height dimensions. Failing that
|
||||
// the item should tell us the natural dimensions of the image. Finally
|
||||
// failing that, we'll assume that the image was never loaded in the
|
||||
// other process (this can be true for favicons, for example), and so
|
||||
// we'll assume that we can use the natural dimensions of the newImage
|
||||
// we just created. If the natural dimensions of newImage are not known
|
||||
// then the image is probably broken.
|
||||
if (!isBG) {
|
||||
newImage.width =
|
||||
("width" in item && item.width) || newImage.naturalWidth;
|
||||
newImage.height =
|
||||
("height" in item && item.height) || newImage.naturalHeight;
|
||||
// "width" and "height" attributes must be set to newImage,
|
||||
// even if there is no "width" or "height attribute in item;
|
||||
// otherwise, the preview image cannot be displayed correctly.
|
||||
// Since the image might have been loaded out-of-process, we expect
|
||||
// the item to tell us its width / height dimensions. Failing that
|
||||
// the item should tell us the natural dimensions of the image. Finally
|
||||
// failing that, we'll assume that the image was never loaded in the
|
||||
// other process (this can be true for favicons, for example), and so
|
||||
// we'll assume that we can use the natural dimensions of the newImage
|
||||
// we just created. If the natural dimensions of newImage are not known
|
||||
// then the image is probably broken.
|
||||
if (!isBG) {
|
||||
newImage.width =
|
||||
("width" in item && item.width) || newImage.naturalWidth;
|
||||
newImage.height =
|
||||
("height" in item && item.height) || newImage.naturalHeight;
|
||||
} else {
|
||||
// the Width and Height of an HTML tag should not be used for its background image
|
||||
// (for example, "table" can have "width" or "height" attributes)
|
||||
newImage.width = item.naturalWidth || newImage.naturalWidth;
|
||||
newImage.height = item.naturalHeight || newImage.naturalHeight;
|
||||
}
|
||||
|
||||
if (item.SVGImageElement) {
|
||||
newImage.width = item.SVGImageElementWidth;
|
||||
newImage.height = item.SVGImageElementHeight;
|
||||
}
|
||||
|
||||
width = newImage.width;
|
||||
height = newImage.height;
|
||||
|
||||
document.getElementById("theimagecontainer").collapsed = false;
|
||||
document.getElementById("brokenimagecontainer").collapsed = true;
|
||||
|
||||
if (url) {
|
||||
if (width != physWidth || height != physHeight) {
|
||||
document.l10n.setAttributes(
|
||||
document.getElementById("imagedimensiontext"),
|
||||
"media-dimensions-scaled",
|
||||
{
|
||||
dimx: formatNumber(physWidth),
|
||||
dimy: formatNumber(physHeight),
|
||||
scaledx: formatNumber(width),
|
||||
scaledy: formatNumber(height),
|
||||
}
|
||||
);
|
||||
} else {
|
||||
// the Width and Height of an HTML tag should not be used for its background image
|
||||
// (for example, "table" can have "width" or "height" attributes)
|
||||
newImage.width = item.naturalWidth || newImage.naturalWidth;
|
||||
newImage.height = item.naturalHeight || newImage.naturalHeight;
|
||||
document.l10n.setAttributes(
|
||||
document.getElementById("imagedimensiontext"),
|
||||
"media-dimensions",
|
||||
{ dimx: formatNumber(width), dimy: formatNumber(height) }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (item.SVGImageElement) {
|
||||
newImage.width = item.SVGImageElementWidth;
|
||||
newImage.height = item.SVGImageElementHeight;
|
||||
}
|
||||
|
||||
width = newImage.width;
|
||||
height = newImage.height;
|
||||
|
||||
document.getElementById("theimagecontainer").collapsed = false;
|
||||
document.getElementById("brokenimagecontainer").collapsed = true;
|
||||
|
||||
if (url) {
|
||||
if (width != physWidth || height != physHeight) {
|
||||
document.l10n.setAttributes(
|
||||
document.getElementById("imagedimensiontext"),
|
||||
"media-dimensions-scaled",
|
||||
{
|
||||
dimx: formatNumber(physWidth),
|
||||
dimy: formatNumber(physHeight),
|
||||
scaledx: formatNumber(width),
|
||||
scaledy: formatNumber(height),
|
||||
}
|
||||
);
|
||||
} else {
|
||||
document.l10n.setAttributes(
|
||||
document.getElementById("imagedimensiontext"),
|
||||
"media-dimensions",
|
||||
{ dimx: formatNumber(width), dimy: formatNumber(height) }
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
// We need to wait for the image to finish loading before using width & height
|
||||
newImage.addEventListener("load", loadOrErrorListener);
|
||||
newImage.addEventListener("error", loadOrErrorListener);
|
||||
|
||||
newImage.setAttribute("triggeringprincipal", triggeringPrinStr);
|
||||
newImage.setAttribute("src", url);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
noautofocus="true"
|
||||
role="alert"/>
|
||||
|
||||
<popupnotification id="webRTC-shareDevices-notification" hidden="true"
|
||||
<popupnotification id="webRTC-shareDevices-notification" hidden="true"
|
||||
descriptionid="webRTC-shareDevices-notification-description">
|
||||
<popupnotificationcontent id="webRTC-selectCamera" orient="vertical">
|
||||
<label id="webRTC-selectCamera-label"
|
||||
|
@ -167,3 +167,26 @@
|
|||
</vbox>
|
||||
</popupnotificationfooter>
|
||||
</popupnotification>
|
||||
|
||||
<popupnotification id="identity-credential-notification" hidden="true">
|
||||
<popupnotificationcontent id="identity-credential-provider" orient="vertical">
|
||||
<html:div id="identity-credential-provider-selector-container">
|
||||
</html:div>
|
||||
<description class="popup-notification-description" id="credential-provider-explanation" data-l10n-id="credential-description-provider-explanation"/>
|
||||
<html:template id="template-credential-provider-list-item">
|
||||
<toolbarbutton class="credential-provider-list-item subviewbutton-nav subviewbutton" align="center" wrap="true">
|
||||
<label flex="1" class="credential-provider-list-item-label"></label>
|
||||
</toolbarbutton>
|
||||
</html:template>
|
||||
</popupnotificationcontent>
|
||||
<popupnotificationcontent id="identity-credential-account" orient="vertical" hidden="true">
|
||||
<html:div id="identity-credential-account-selector-container">
|
||||
</html:div>
|
||||
<description class="popup-notification-description" id="credential-account-explanation"/>
|
||||
<html:template id="template-credential-account-list-item">
|
||||
<toolbarbutton class="credential-account-list-item subviewbutton-nav subviewbutton" align="center" wrap="true">
|
||||
<label flex="1" class="credential-account-list-item-label"></label>
|
||||
</toolbarbutton>
|
||||
</html:template>
|
||||
</popupnotificationcontent>
|
||||
</popupnotification>
|
||||
|
|
|
@ -817,7 +817,7 @@
|
|||
let replace = !!targetTab;
|
||||
let newIndex = this._getDropIndex(event, true);
|
||||
let urls = links.map(link => link.url);
|
||||
let csp = browserDragAndDrop.getCSP(event);
|
||||
let csp = browserDragAndDrop.getCsp(event);
|
||||
let triggeringPrincipal = browserDragAndDrop.getTriggeringPrincipal(
|
||||
event
|
||||
);
|
||||
|
|
|
@ -144,3 +144,47 @@ add_task(async function test_remote_configuration() {
|
|||
|
||||
await doCleanup();
|
||||
});
|
||||
|
||||
add_task(async function test_places_db_stats_table() {
|
||||
await BrowserTestUtils.withNewTab(
|
||||
{ gBrowser, url: "about:support" },
|
||||
async function(browser) {
|
||||
const [
|
||||
initialToggleText,
|
||||
toggleTextAfterShow,
|
||||
toggleTextAfterHide,
|
||||
] = await SpecialPowers.spawn(browser, [], async function() {
|
||||
const toggleButton = content.document.getElementById(
|
||||
"place-database-stats-toggle"
|
||||
);
|
||||
const getToggleText = () =>
|
||||
content.document.l10n.getAttributes(toggleButton).id;
|
||||
const toggleTexts = [];
|
||||
const table = content.document.getElementById(
|
||||
"place-database-stats-tbody"
|
||||
);
|
||||
await ContentTaskUtils.waitForCondition(
|
||||
() => table.style.display === "none",
|
||||
"Stats table is hidden initially"
|
||||
);
|
||||
toggleTexts.push(getToggleText());
|
||||
toggleButton.click();
|
||||
await ContentTaskUtils.waitForCondition(
|
||||
() => table.style.display === "",
|
||||
"Stats table is shown after first toggle"
|
||||
);
|
||||
toggleTexts.push(getToggleText());
|
||||
toggleButton.click();
|
||||
await ContentTaskUtils.waitForCondition(
|
||||
() => table.style.display === "none",
|
||||
"Stats table is hidden after second toggle"
|
||||
);
|
||||
toggleTexts.push(getToggleText());
|
||||
return toggleTexts;
|
||||
});
|
||||
Assert.equal(initialToggleText, "place-database-stats-show");
|
||||
Assert.equal(toggleTextAfterShow, "place-database-stats-hide");
|
||||
Assert.equal(toggleTextAfterHide, "place-database-stats-show");
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
|
@ -20,11 +20,11 @@ async function testFirstPartyDomain(pageInfo) {
|
|||
info("preview.src=" + preview.src);
|
||||
|
||||
// For <img>, we will query imgIRequest.imagePrincipal later, so we wait
|
||||
// for loadend event. For <audio> and <video>, so far we only can get
|
||||
// for load event. For <audio> and <video>, so far we only can get
|
||||
// the triggeringprincipal attribute on the node, so we simply wait for
|
||||
// loadstart.
|
||||
if (i == 0) {
|
||||
await BrowserTestUtils.waitForEvent(preview, "loadend");
|
||||
await BrowserTestUtils.waitForEvent(preview, "load");
|
||||
} else {
|
||||
await BrowserTestUtils.waitForEvent(preview, "loadstart");
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ add_task(async function() {
|
|||
await BrowserTestUtils.waitForEvent(pageInfo, "page-info-init");
|
||||
|
||||
let pageInfoImg = pageInfo.document.getElementById("thepreviewimage");
|
||||
await BrowserTestUtils.waitForEvent(pageInfoImg, "loadend");
|
||||
await BrowserTestUtils.waitForEvent(pageInfoImg, "load");
|
||||
Assert.equal(
|
||||
pageInfoImg.src,
|
||||
imageInfo.src,
|
||||
|
|
|
@ -245,11 +245,11 @@ add_task(async function navigate_around() {
|
|||
// The following 2 sandbox prefs are covered by
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1639494
|
||||
knownProblematicPrefs["security.sandbox.content.read_path_whitelist"] = {
|
||||
min: 49,
|
||||
min: 48,
|
||||
max: 55,
|
||||
};
|
||||
knownProblematicPrefs["security.sandbox.logging.enabled"] = {
|
||||
min: 49,
|
||||
min: 48,
|
||||
max: 55,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ ChromeUtils.defineESModuleGetters(this, {
|
|||
* we are sure that an attempt to display a notification will not fail.
|
||||
*/
|
||||
async function waitForWindowReadyForPopupNotifications(win) {
|
||||
// These are the same checks that PopupNotifications.jsm makes before it
|
||||
// These are the same checks that PopupNotifications.sys.mjs makes before it
|
||||
// allows a notification to open.
|
||||
await TestUtils.waitForCondition(
|
||||
() => win.gBrowser.selectedBrowser.docShellIsActive,
|
||||
|
|
|
@ -10,9 +10,9 @@ function getFirefoxExecutableFile() {
|
|||
return file;
|
||||
}
|
||||
|
||||
// This is copied from WindowsRegistry.jsm, but extended to support
|
||||
// This is copied from WindowsRegistry.sys.mjs, but extended to support
|
||||
// TYPE_BINARY, as that is how we represent doubles in the registry for
|
||||
// the skeleton UI. However, we didn't extend WindowsRegistry.jsm itself,
|
||||
// the skeleton UI. However, we didn't extend WindowsRegistry.sys.mjs itself,
|
||||
// because TYPE_BINARY is kind of a footgun for javascript callers - our
|
||||
// use case is just trivial (checking that the value is non-zero).
|
||||
function readRegKeyExtended(aRoot, aPath, aKey, aRegistryNode = 0) {
|
||||
|
|
|
@ -94,6 +94,8 @@ https_first_disabled = true
|
|||
[browser_new_tab_insert_position.js]
|
||||
https_first_disabled = true
|
||||
support-files = file_new_tab_page.html
|
||||
[browser_new_tab_url.js]
|
||||
support-files = file_new_tab_page.html
|
||||
[browser_new_tab_in_privilegedabout_process_pref.js]
|
||||
https_first_disabled = true
|
||||
skip-if =
|
||||
|
|
29
browser/base/content/test/tabs/browser_new_tab_url.js
Normal file
29
browser/base/content/test/tabs/browser_new_tab_url.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
"use strict";
|
||||
|
||||
add_task(async function test_browser_open_newtab_default_url() {
|
||||
BrowserOpenTab();
|
||||
const tab = gBrowser.selectedTab;
|
||||
|
||||
if (tab.linkedBrowser.currentURI.spec !== window.BROWSER_NEW_TAB_URL) {
|
||||
// If about:newtab is not loaded immediately, wait for any location change.
|
||||
await BrowserTestUtils.waitForLocationChange(gBrowser);
|
||||
}
|
||||
|
||||
is(tab.linkedBrowser.currentURI.spec, window.BROWSER_NEW_TAB_URL);
|
||||
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
});
|
||||
|
||||
add_task(async function test_browser_open_newtab_specific_url() {
|
||||
const url = "https://example.com";
|
||||
|
||||
BrowserOpenTab({ url });
|
||||
const tab = gBrowser.selectedTab;
|
||||
|
||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
is(tab.linkedBrowser.currentURI.spec, "https://example.com/");
|
||||
|
||||
BrowserTestUtils.removeTab(tab);
|
||||
});
|
|
@ -28,6 +28,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
|
||||
Integration: "resource://gre/modules/Integration.sys.mjs",
|
||||
BuiltInThemes: "resource:///modules/BuiltInThemes.sys.mjs",
|
||||
DAPTelemetrySender: "resource://gre/modules/DAPTelemetrySender.sys.mjs",
|
||||
Interactions: "resource:///modules/Interactions.sys.mjs",
|
||||
Log: "resource://gre/modules/Log.sys.mjs",
|
||||
NewTabUtils: "resource://gre/modules/NewTabUtils.sys.mjs",
|
||||
|
@ -46,6 +47,8 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||
UrlbarQuickSuggest: "resource:///modules/UrlbarQuickSuggest.sys.mjs",
|
||||
WebChannel: "resource://gre/modules/WebChannel.sys.mjs",
|
||||
WindowsRegistry: "resource://gre/modules/WindowsRegistry.sys.mjs",
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
|
@ -2659,10 +2662,7 @@ BrowserGlue.prototype = {
|
|||
|
||||
{
|
||||
task: () => {
|
||||
let { setTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
setTimeout(function() {
|
||||
lazy.setTimeout(function() {
|
||||
Services.tm.idleDispatchToMainThread(
|
||||
Services.startup.trackStartupCrashEnd
|
||||
);
|
||||
|
@ -2860,6 +2860,16 @@ BrowserGlue.prototype = {
|
|||
},
|
||||
},
|
||||
|
||||
{
|
||||
condition: Services.prefs.getBoolPref(
|
||||
"toolkit.telemetry.dap_enabled",
|
||||
false
|
||||
),
|
||||
task: () => {
|
||||
lazy.DAPTelemetrySender.startup();
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
task: () => {
|
||||
// Use idleDispatch a second time to run this after the per-window
|
||||
|
@ -2964,6 +2974,21 @@ BrowserGlue.prototype = {
|
|||
() => Services.search.runBackgroundChecks(),
|
||||
|
||||
() => lazy.BrowserUsageTelemetry.reportInstallationTelemetry(),
|
||||
|
||||
async () => {
|
||||
let win = lazy.BrowserWindowTracker.getTopWindow({ private: false });
|
||||
if (!win) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof win.navigator.requestMIDIAccess != "function") {
|
||||
return;
|
||||
}
|
||||
|
||||
const { inputs, outputs } = await win.navigator.requestMIDIAccess();
|
||||
const hasMIDIDevices = inputs.size + outputs.size > 0;
|
||||
Services.telemetry.scalarSet("dom.midi.has_devices", hasMIDIDevices);
|
||||
},
|
||||
];
|
||||
|
||||
for (let task of idleTasks) {
|
||||
|
@ -3258,7 +3283,7 @@ BrowserGlue.prototype = {
|
|||
false
|
||||
); // Do not export.
|
||||
if (autoExportHTML) {
|
||||
// Sqlite.jsm and Places shutdown happen at profile-before-change, thus,
|
||||
// Sqlite.sys.mjs and Places shutdown happen at profile-before-change, thus,
|
||||
// to be on the safe side, this should run earlier.
|
||||
lazy.AsyncShutdown.profileChangeTeardown.addBlocker(
|
||||
"Places: export bookmarks.html",
|
||||
|
@ -5140,7 +5165,7 @@ var ContentBlockingCategoriesPrefs = {
|
|||
* While there are some built-in permission prompts, createPermissionPrompt
|
||||
* can also be overridden by system add-ons or tests to provide new ones.
|
||||
*
|
||||
* This override ability is provided by Integration.jsm. See
|
||||
* This override ability is provided by Integration.sys.mjs. See
|
||||
* PermissionUI.jsm for an example of how to provide a new prompt
|
||||
* from an add-on.
|
||||
*/
|
||||
|
@ -5840,15 +5865,11 @@ var AboutHomeStartupCache = {
|
|||
|
||||
// To avoid hanging shutdowns, we'll ensure that we wait a maximum of
|
||||
// SHUTDOWN_CACHE_WRITE_TIMEOUT_MS millseconds before giving up.
|
||||
let { setTimeout, clearTimeout } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Timer.sys.mjs"
|
||||
);
|
||||
|
||||
const TIMED_OUT = Symbol();
|
||||
let timeoutID = 0;
|
||||
|
||||
let timeoutPromise = new Promise(resolve => {
|
||||
timeoutID = setTimeout(
|
||||
timeoutID = lazy.setTimeout(
|
||||
() => resolve(TIMED_OUT),
|
||||
this.SHUTDOWN_CACHE_WRITE_TIMEOUT_MS
|
||||
);
|
||||
|
@ -5864,7 +5885,7 @@ var AboutHomeStartupCache = {
|
|||
|
||||
let result = await Promise.race(promises);
|
||||
this.log.trace("Done blocking shutdown.");
|
||||
clearTimeout(timeoutID);
|
||||
lazy.clearTimeout(timeoutID);
|
||||
if (result === TIMED_OUT) {
|
||||
this.log.error("Timed out getting cache streams. Skipping cache task.");
|
||||
return false;
|
||||
|
|
|
@ -103,7 +103,7 @@ add_setup(async function setup_head() {
|
|||
}
|
||||
|
||||
if (msg.errorMessage.includes('Unknown event: ["jsonfile", "load"')) {
|
||||
// Ignore telemetry errors from JSONFile.jsm.
|
||||
// Ignore telemetry errors from JSONFile.sys.mjs.
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
|||
);
|
||||
let consoleOptions = {
|
||||
// tip: set maxLogLevel to "debug" and use lazy.log.debug() to create
|
||||
// detailed messages during development. See LOG_LEVELS in Console.jsm for
|
||||
// details.
|
||||
// detailed messages during development. See LOG_LEVELS in Console.sys.mjs
|
||||
// for details.
|
||||
maxLogLevel: "error",
|
||||
maxLogLevelPref: "browser.attribution.loglevel",
|
||||
prefix: "AttributionCode",
|
||||
|
|
|
@ -15,8 +15,8 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
|||
);
|
||||
let consoleOptions = {
|
||||
// tip: set maxLogLevel to "debug" and use lazy.log.debug() to create
|
||||
// detailed messages during development. See LOG_LEVELS in Console.jsm for
|
||||
// details.
|
||||
// detailed messages during development. See LOG_LEVELS in Console.sys.mjs
|
||||
// for details.
|
||||
maxLogLevel: "error",
|
||||
maxLogLevelPref: "browser.attribution.mac.loglevel",
|
||||
prefix: "MacAttribution",
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<panelmultiview id="protections-popup-multiView"
|
||||
mainViewId="protections-popup-mainView">
|
||||
<panelview id="protections-popup-mainView"
|
||||
class="PanelUI-subView"
|
||||
role="document">
|
||||
<vbox id="protections-popup-mainView-panel-header-section">
|
||||
<hbox id="protections-popup-mainView-panel-header"
|
||||
|
@ -31,6 +32,7 @@
|
|||
<description id="protections-popup-toast-panel-tp-on-desc" data-l10n-id="protections-panel-etp-on-header"></description>
|
||||
<description id="protections-popup-toast-panel-tp-off-desc" data-l10n-id="protections-panel-etp-off-header"></description>
|
||||
</hbox>
|
||||
<toolbarseparator></toolbarseparator>
|
||||
|
||||
<html:div id="messaging-system-message-container" disabled="true">
|
||||
<!-- Messaging System Messages will render in this container -->
|
||||
|
@ -38,103 +40,107 @@
|
|||
</vbox>
|
||||
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<hbox id="protections-popup-tp-switch-section" class="protections-popup-section">
|
||||
<vbox class="protections-popup-tp-switch-label-box" flex="1" align="start">
|
||||
<label class="protections-popup-tp-switch-on-header"
|
||||
role="heading"
|
||||
aria-level="2" data-l10n-id="protections-panel-etp-on-header"></label>
|
||||
<label class="protections-popup-tp-switch-off-header"
|
||||
role="heading"
|
||||
aria-level="2" data-l10n-id="protections-panel-etp-off-header"></label>
|
||||
<label id="protections-popup-tp-switch-breakage-link"
|
||||
class="text-link"
|
||||
onclick="gProtectionsHandler.showSiteNotWorkingView(); gProtectionsHandler.recordClick('sitenotworking_link');" data-l10n-id="protections-panel-site-not-working"></label>
|
||||
<label id="protections-popup-tp-switch-breakage-fixed-link"
|
||||
class="text-link"
|
||||
onclick="gProtectionsHandler.showSendReportView(); gProtectionsHandler.recordClick('sitenotworking_link', 'sitefixed');"
|
||||
data-l10n-id="protections-panel-sitefixedsendreport-label"></label>
|
||||
</vbox>
|
||||
<vbox class="protections-popup-tp-switch-box">
|
||||
<toolbarbutton id="protections-popup-tp-switch"
|
||||
class="protections-popup-tp-switch"
|
||||
enabled="false"
|
||||
oncommand="gProtectionsHandler.onTPSwitchCommand();" />
|
||||
</vbox>
|
||||
</hbox>
|
||||
<vbox id="protections-popup-main-body" class="panel-subview-body">
|
||||
<hbox id="protections-popup-tp-switch-section" class="protections-popup-section">
|
||||
<vbox class="protections-popup-tp-switch-label-box" flex="1" align="start">
|
||||
<label class="protections-popup-tp-switch-on-header"
|
||||
role="heading"
|
||||
aria-level="2" data-l10n-id="protections-panel-etp-on-header"></label>
|
||||
<label class="protections-popup-tp-switch-off-header"
|
||||
role="heading"
|
||||
aria-level="2" data-l10n-id="protections-panel-etp-off-header"></label>
|
||||
<label id="protections-popup-tp-switch-breakage-link"
|
||||
class="text-link"
|
||||
onclick="gProtectionsHandler.showSiteNotWorkingView(); gProtectionsHandler.recordClick('sitenotworking_link');" data-l10n-id="protections-panel-site-not-working"></label>
|
||||
<label id="protections-popup-tp-switch-breakage-fixed-link"
|
||||
class="text-link"
|
||||
onclick="gProtectionsHandler.showSendReportView(); gProtectionsHandler.recordClick('sitenotworking_link', 'sitefixed');"
|
||||
data-l10n-id="protections-panel-sitefixedsendreport-label"></label>
|
||||
</vbox>
|
||||
<vbox class="protections-popup-tp-switch-box">
|
||||
<toolbarbutton id="protections-popup-tp-switch"
|
||||
class="protections-popup-tp-switch"
|
||||
enabled="false"
|
||||
oncommand="gProtectionsHandler.onTPSwitchCommand();" />
|
||||
</vbox>
|
||||
</hbox>
|
||||
|
||||
<!-- Tracking Protection Section -->
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<vbox id="tracking-protection-container" class="protections-popup-section">
|
||||
<description id="protections-popup-no-trackers-found-description" data-l10n-id="protections-panel-no-trackers-found"></description>
|
||||
<tooltip id="protections-popup-not-blocking-why-etp-on-tooltip" data-l10n-id="protections-panel-not-blocking-why-etp-on-tooltip"></tooltip>
|
||||
<tooltip id="protections-popup-not-blocking-why-etp-off-tooltip" data-l10n-id="protections-panel-not-blocking-why-etp-off-tooltip"></tooltip>
|
||||
<vbox id="protections-popup-content" flex="1">
|
||||
<vbox id="protections-popup-category-list">
|
||||
<toolbarbutton id="protections-popup-category-trackers"
|
||||
oncommand="gProtectionsHandler.showTrackersSubview(event); gProtectionsHandler.recordClick('trackers');"
|
||||
class="protections-popup-category subviewbutton-nav" align="center">
|
||||
<image class="protections-popup-category-icon trackers-icon"/>
|
||||
<label flex="1" class="protections-popup-category-label" data-l10n-id="protections-panel-content-blocking-tracking-protection"></label>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="protections-popup-category-socialblock"
|
||||
oncommand="gProtectionsHandler.showSocialblockerSubview(event); gProtectionsHandler.recordClick('social');"
|
||||
class="protections-popup-category subviewbutton-nav" align="center">
|
||||
<image class="protections-popup-category-icon socialblock-icon"/>
|
||||
<label flex="1"
|
||||
class="protections-popup-category-label" data-l10n-id="protections-panel-content-blocking-socialblock"></label>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="protections-popup-category-cookies"
|
||||
oncommand="gProtectionsHandler.showCookiesSubview(event); gProtectionsHandler.recordClick('cookies');"
|
||||
class="protections-popup-category subviewbutton-nav" align="center">
|
||||
<image class="protections-popup-category-icon thirdpartycookies-icon"/>
|
||||
<label flex="1" id="protections-popup-cookies-category-label"
|
||||
class="protections-popup-category-label"/>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="protections-popup-category-cryptominers"
|
||||
oncommand="gProtectionsHandler.showCryptominersSubview(event); gProtectionsHandler.recordClick('cryptominers');"
|
||||
class="protections-popup-category subviewbutton-nav" align="center">
|
||||
<image class="protections-popup-category-icon cryptominers-icon"/>
|
||||
<label flex="1" class="protections-popup-category-label" data-l10n-id="protections-panel-content-blocking-cryptominers-label"></label>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="protections-popup-category-fingerprinters"
|
||||
oncommand="gProtectionsHandler.showFingerprintersSubview(event); gProtectionsHandler.recordClick('fingerprinters');"
|
||||
class="protections-popup-category subviewbutton-nav" align="center">
|
||||
<image class="protections-popup-category-icon fingerprinters-icon"/>
|
||||
<label flex="1" class="protections-popup-category-label" data-l10n-id="protections-panel-content-blocking-fingerprinters-label"></label>
|
||||
</toolbarbutton>
|
||||
<description id="protections-popup-blocking-section-header"
|
||||
role="heading"
|
||||
aria-level="2" data-l10n-id="protections-panel-blocking-label"></description>
|
||||
<hbox id="protections-popup-not-blocking-section-header" flex="1">
|
||||
<description id="protections-popup-not-blocking-section-description" flex="1" role="heading" aria-level="2" data-l10n-id="protections-panel-not-blocking-label"></description>
|
||||
<label id="protections-popup-not-blocking-section-why"
|
||||
onmouseover="document.getElementById(event.target.tooltip).openPopup(event.target);"
|
||||
onfocus="document.getElementById(event.target.tooltip).openPopup(event.target);"
|
||||
onmouseout="document.getElementById(event.target.tooltip).hidePopup()"
|
||||
onblur="document.getElementById(event.target.tooltip).hidePopup()" data-l10n-id="protections-panel-not-blocking-why-label"></label>
|
||||
</hbox>
|
||||
<description id="protections-popup-not-found-section-header"
|
||||
role="heading"
|
||||
aria-level="2" data-l10n-id="protections-panel-not-found-label"></description>
|
||||
<!-- Tracking Protection Section -->
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<vbox id="tracking-protection-container" class="protections-popup-section">
|
||||
<description id="protections-popup-no-trackers-found-description" data-l10n-id="protections-panel-no-trackers-found"></description>
|
||||
<tooltip id="protections-popup-not-blocking-why-etp-on-tooltip" data-l10n-id="protections-panel-not-blocking-why-etp-on-tooltip"></tooltip>
|
||||
<tooltip id="protections-popup-not-blocking-why-etp-off-tooltip" data-l10n-id="protections-panel-not-blocking-why-etp-off-tooltip"></tooltip>
|
||||
<vbox id="protections-popup-content" flex="1">
|
||||
<vbox id="protections-popup-category-list">
|
||||
<toolbarbutton id="protections-popup-category-trackers"
|
||||
oncommand="gProtectionsHandler.showTrackersSubview(event); gProtectionsHandler.recordClick('trackers');"
|
||||
class="protections-popup-category subviewbutton subviewbutton-iconic" align="center">
|
||||
<image class="toolbarbutton-icon protections-popup-category-icon trackers-icon"/>
|
||||
<label flex="1" class="toolbarbutton-text protections-popup-category-label" data-l10n-id="protections-panel-content-blocking-tracking-protection"></label>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="protections-popup-category-socialblock"
|
||||
oncommand="gProtectionsHandler.showSocialblockerSubview(event); gProtectionsHandler.recordClick('social');"
|
||||
class="protections-popup-category subviewbutton subviewbutton-iconic" align="center">
|
||||
<image class="toolbarbutton-icon protections-popup-category-icon socialblock-icon"/>
|
||||
<label flex="1"
|
||||
class="toolbarbutton-text protections-popup-category-label" data-l10n-id="protections-panel-content-blocking-socialblock"></label>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="protections-popup-category-cookies"
|
||||
oncommand="gProtectionsHandler.showCookiesSubview(event); gProtectionsHandler.recordClick('cookies');"
|
||||
class="protections-popup-category subviewbutton subviewbutton-iconic" align="center">
|
||||
<image class="toolbarbutton-icon protections-popup-category-icon thirdpartycookies-icon"/>
|
||||
<label flex="1" id="protections-popup-cookies-category-label"
|
||||
class="toolbarbutton-text protections-popup-category-label"/>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="protections-popup-category-cryptominers"
|
||||
oncommand="gProtectionsHandler.showCryptominersSubview(event); gProtectionsHandler.recordClick('cryptominers');"
|
||||
class="protections-popup-category subviewbutton subviewbutton-iconic" align="center">
|
||||
<image class="toolbarbutton-icon protections-popup-category-icon cryptominers-icon"/>
|
||||
<label flex="1" class="toolbarbutton-text protections-popup-category-label" data-l10n-id="protections-panel-content-blocking-cryptominers-label"></label>
|
||||
</toolbarbutton>
|
||||
<toolbarbutton id="protections-popup-category-fingerprinters"
|
||||
oncommand="gProtectionsHandler.showFingerprintersSubview(event); gProtectionsHandler.recordClick('fingerprinters');"
|
||||
class="protections-popup-category subviewbutton subviewbutton-iconic" align="center">
|
||||
<image class="toolbarbutton-icon protections-popup-category-icon fingerprinters-icon"/>
|
||||
<label flex="1" class="toolbarbutton-text protections-popup-category-label" data-l10n-id="protections-panel-content-blocking-fingerprinters-label"></label>
|
||||
</toolbarbutton>
|
||||
<description id="protections-popup-blocking-section-header"
|
||||
class="protections-popup-section-header"
|
||||
role="heading"
|
||||
aria-level="2" data-l10n-id="protections-panel-blocking-label"></description>
|
||||
<hbox id="protections-popup-not-blocking-section-header" class="protections-popup-section-header" flex="1">
|
||||
<description id="protections-popup-not-blocking-section-description" flex="1" role="heading" aria-level="2" data-l10n-id="protections-panel-not-blocking-label"></description>
|
||||
<label id="protections-popup-not-blocking-section-why"
|
||||
onmouseover="document.getElementById(event.target.tooltip).openPopup(event.target);"
|
||||
onfocus="document.getElementById(event.target.tooltip).openPopup(event.target);"
|
||||
onmouseout="document.getElementById(event.target.tooltip).hidePopup()"
|
||||
onblur="document.getElementById(event.target.tooltip).hidePopup()" data-l10n-id="protections-panel-not-blocking-why-label"></label>
|
||||
</hbox>
|
||||
<description id="protections-popup-not-found-section-header"
|
||||
class="protections-popup-section-header"
|
||||
role="heading"
|
||||
aria-level="2" data-l10n-id="protections-panel-not-found-label"></description>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<vbox id="protections-popup-footer" class="protections-popup-section">
|
||||
<vbox id="protections-popup-footer" class="panel-subview-footer-button">
|
||||
<toolbarbutton id="protections-popup-settings-button"
|
||||
class="protections-popup-footer-button"
|
||||
class="subviewbutton protections-popup-footer-button"
|
||||
oncommand="gProtectionsHandler.openPreferences(); gProtectionsHandler.recordClick('settings');">
|
||||
<image class="protections-popup-footer-icon protections-popup-settings-icon"/>
|
||||
<label class="protections-popup-footer-button-label" flex="1" data-l10n-id="protections-panel-settings-label"></label>
|
||||
<label id="protections-popup-footer-protection-type-label"></label>
|
||||
<label class="toolbarbutton-text protections-popup-footer-button-label" flex="1" data-l10n-id="protections-panel-settings-label"></label>
|
||||
<label id="protections-popup-footer-protection-type-label" class="toolbarbutton-text"></label>
|
||||
</toolbarbutton>
|
||||
<stack id="protections-popup-show-report-stack">
|
||||
<toolbarbutton id="protections-popup-show-report-button"
|
||||
class="protections-popup-footer-button"
|
||||
class="subviewbutton protections-popup-footer-button"
|
||||
oncommand="gProtectionsHandler.openProtections(true); gProtectionsHandler.recordClick('full_report');">
|
||||
<image class="protections-popup-footer-icon protections-popup-show-report-icon"/>
|
||||
<label class="protections-popup-footer-button-label" flex="1" data-l10n-id="protections-panel-protectionsdashboard-label"></label>
|
||||
<label class="toolbarbutton-text protections-popup-footer-button-label" flex="1" data-l10n-id="protections-panel-protectionsdashboard-label"></label>
|
||||
</toolbarbutton>
|
||||
<hbox id="protections-popup-trackers-blocked-counter-box"
|
||||
align="center">
|
||||
|
@ -142,22 +148,24 @@
|
|||
onclick="gProtectionsHandler.openProtections(true);"/>
|
||||
</hbox>
|
||||
</stack>
|
||||
</vbox>
|
||||
|
||||
<toolbarseparator id="protections-popup-milestones-separator"/>
|
||||
<hbox id="protections-popup-milestones" class="protections-popup-section">
|
||||
<toolbarbutton id="protections-popup-milestones-content"
|
||||
flex="1"
|
||||
oncommand="gProtectionsHandler.openProtections(true); gProtectionsHandler.recordClick('milestone_message');">
|
||||
<description id="protections-popup-milestones-text" flex="1"
|
||||
role="heading" aria-level="2"/>
|
||||
<image id="protections-popup-milestones-illustration"/>
|
||||
</toolbarbutton>
|
||||
</hbox>
|
||||
<toolbarseparator id="protections-popup-milestones-separator"/>
|
||||
<hbox id="protections-popup-milestones" class="protections-popup-section">
|
||||
<toolbarbutton id="protections-popup-milestones-content"
|
||||
class="subviewbutton"
|
||||
flex="1"
|
||||
oncommand="gProtectionsHandler.openProtections(true); gProtectionsHandler.recordClick('milestone_message');">
|
||||
<description id="protections-popup-milestones-text" flex="1"
|
||||
role="heading" aria-level="2"/>
|
||||
<image id="protections-popup-milestones-illustration"/>
|
||||
</toolbarbutton>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</panelview>
|
||||
|
||||
<!-- Site Not Working? SubView -->
|
||||
<panelview id="protections-popup-siteNotWorkingView"
|
||||
class="PanelUI-subView"
|
||||
role="document"
|
||||
data-l10n-id="protections-panel-site-not-working-view">
|
||||
<hbox id="protections-popup-siteNotWorkingView-header">
|
||||
|
@ -176,7 +184,8 @@
|
|||
oncommand="gProtectionsHandler.onTPSwitchCommand();" />
|
||||
</vbox>
|
||||
</hbox>
|
||||
<vbox id="protections-popup-siteNotWorkingView-body" align="start">
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<vbox id="protections-popup-siteNotWorkingView-body" class="panel-subview-body" align="start">
|
||||
<label role="heading" aria-level="2" data-l10n-id="protections-panel-site-not-working-view-header"></label>
|
||||
<label>
|
||||
<html:ul id="protections-popup-siteNotWorkingView-body-issue-list">
|
||||
|
@ -195,6 +204,7 @@
|
|||
|
||||
<!-- Trackers SubView -->
|
||||
<panelview id="protections-popup-trackersView"
|
||||
class="PanelUI-subView"
|
||||
role="document">
|
||||
<vbox id="protections-popup-trackersView-description" class="protections-popup-description">
|
||||
<description data-l10n-id="protections-panel-tracking-content"></description>
|
||||
|
@ -212,7 +222,7 @@
|
|||
</hbox>
|
||||
</vbox>
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<vbox id="protections-popup-trackersView-list" class="protections-popup-list">
|
||||
<vbox id="protections-popup-trackersView-list" class="panel-subview-body protections-popup-list">
|
||||
</vbox>
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<toolbarbutton id="protections-popup-trackersView-settings-button"
|
||||
|
@ -223,6 +233,7 @@
|
|||
|
||||
<!-- Social Block SubView -->
|
||||
<panelview id="protections-popup-socialblockView"
|
||||
class="PanelUI-subView"
|
||||
role="document">
|
||||
<vbox id="protections-popup-socialblockView-heading" class="protections-popup-description">
|
||||
<description data-l10n-id="protections-panel-social-media-trackers"></description>
|
||||
|
@ -240,7 +251,7 @@
|
|||
</hbox>
|
||||
</vbox>
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<vbox id="protections-popup-socialblockView-list" class="protections-popup-list">
|
||||
<vbox id="protections-popup-socialblockView-list" class="panel-subview-body protections-popup-list">
|
||||
</vbox>
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<toolbarbutton id="protections-popup-socialblockView-settings-button"
|
||||
|
@ -251,12 +262,13 @@
|
|||
|
||||
<!-- Cookies SubView -->
|
||||
<panelview id="protections-popup-cookiesView"
|
||||
class="PanelUI-subView"
|
||||
role="document">
|
||||
<vbox id="protections-popup-cookiesView-heading" class="protections-popup-description">
|
||||
<description data-l10n-id="protections-panel-cross-site-tracking-cookies"></description>
|
||||
</vbox>
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<vbox id="protections-popup-cookiesView-list" class="protections-popup-list">
|
||||
<vbox id="protections-popup-cookiesView-list" class="panel-subview-body protections-popup-list">
|
||||
</vbox>
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<toolbarbutton id="protections-popup-cookiesView-settings-button"
|
||||
|
@ -267,6 +279,7 @@
|
|||
|
||||
<!-- Fingerprinters SubView -->
|
||||
<panelview id="protections-popup-fingerprintersView"
|
||||
class="PanelUI-subView"
|
||||
role="document">
|
||||
<vbox id="protections-popup-fingerprinters-heading" class="protections-popup-description">
|
||||
<description data-l10n-id="protections-panel-fingerprinters"></description>
|
||||
|
@ -284,7 +297,7 @@
|
|||
</hbox>
|
||||
</vbox>
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<vbox id="protections-popup-fingerprintersView-list" class="protections-popup-list">
|
||||
<vbox id="protections-popup-fingerprintersView-list" class="panel-subview-body protections-popup-list">
|
||||
</vbox>
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<toolbarbutton id="protections-popup-fingerprintersView-settings-button"
|
||||
|
@ -295,6 +308,7 @@
|
|||
|
||||
<!-- Cryptominers SubView -->
|
||||
<panelview id="protections-popup-cryptominersView"
|
||||
class="PanelUI-subView"
|
||||
role="document">
|
||||
<vbox id="protections-popup-cryptominers-heading" class="protections-popup-description">
|
||||
<description data-l10n-id="protections-panel-cryptominers"></description>
|
||||
|
@ -312,7 +326,7 @@
|
|||
</hbox>
|
||||
</vbox>
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<vbox id="protections-popup-cryptominersView-list" class="protections-popup-list">
|
||||
<vbox id="protections-popup-cryptominersView-list" class="panel-subview-body protections-popup-list">
|
||||
</vbox>
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<toolbarbutton id="protections-popup-cryptominersView-settings-button"
|
||||
|
@ -323,6 +337,7 @@
|
|||
|
||||
<!-- Send Report SubView -->
|
||||
<panelview id="protections-popup-sendReportView"
|
||||
class="PanelUI-subView"
|
||||
data-l10n-id="protections-panel-content-blocking-breakage-report-view">
|
||||
<vbox id="protections-popup-sendReportView-heading">
|
||||
<description data-l10n-id="protections-panel-content-blocking-breakage-report-view-description">
|
||||
|
@ -330,6 +345,7 @@
|
|||
is="text-link" data-l10n-name="learn-more"></label>
|
||||
</description>
|
||||
</vbox>
|
||||
<toolbarseparator></toolbarseparator>
|
||||
<vbox id="protections-popup-sendReportView-body" class="panel-view-body-unscrollable">
|
||||
<vbox class="protections-popup-sendReportView-collection-section">
|
||||
<label control="protections-popup-sendReportView-collection-url" data-l10n-id="protections-panel-content-blocking-breakage-report-view-collection-url"></label>
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
## Credential panel
|
||||
## $host (String): the hostname of the site that is being displayed.
|
||||
|
||||
credential-header-providers = Sign in to { $host }.
|
||||
credential-header-accounts = Pick a { $host } account.
|
||||
# Identity providers are websites you use to log into another website, for example: Google when you Log in with Google.
|
||||
credential-description-provider-explanation = These are the identity providers that would like to help you log in.
|
||||
credential-description-account-explanation = Picking an account here shares that identity with { $host }.
|
||||
urlbar-identity-credential-anchor =
|
||||
.tooltiptext = Open federated login panel
|
||||
credential-cancel-label = Cancel
|
||||
credential-cancel-accesskey = C
|
|
@ -5264,10 +5264,9 @@ OverflowableToolbar.prototype = {
|
|||
|
||||
// If the target has min-width: 0, their children might actually overflow
|
||||
// it, so check for both cases explicitly.
|
||||
let isOverflowing =
|
||||
Math.floor(targetWidth) > totalAvailWidth ||
|
||||
Math.floor(targetChildrenWidth) > totalAvailWidth;
|
||||
return [isOverflowing, totalAvailWidth];
|
||||
let targetContentWidth = Math.max(targetWidth, targetChildrenWidth);
|
||||
let isOverflowing = Math.floor(targetContentWidth) > totalAvailWidth;
|
||||
return { isOverflowing, targetContentWidth, totalAvailWidth };
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -5281,7 +5280,7 @@ OverflowableToolbar.prototype = {
|
|||
let win = this._target.ownerGlobal;
|
||||
let checkOverflowHandle = this._checkOverflowHandle;
|
||||
|
||||
let [isOverflowing] = await this._getOverflowInfo();
|
||||
let { isOverflowing, targetContentWidth } = await this._getOverflowInfo();
|
||||
|
||||
// Stop if the window has closed or if we re-enter while waiting for
|
||||
// layout.
|
||||
|
@ -5295,7 +5294,7 @@ OverflowableToolbar.prototype = {
|
|||
let prevChild = child.previousElementSibling;
|
||||
|
||||
if (child.getAttribute("overflows") != "false") {
|
||||
this._collapsed.set(child.id, this._target.clientWidth);
|
||||
this._collapsed.set(child.id, targetContentWidth);
|
||||
child.setAttribute("overflowedItem", true);
|
||||
child.setAttribute("cui-anchorid", this._chevron.id);
|
||||
CustomizableUIInternal.ensureButtonContextMenu(
|
||||
|
@ -5315,7 +5314,7 @@ OverflowableToolbar.prototype = {
|
|||
}
|
||||
}
|
||||
child = prevChild;
|
||||
[isOverflowing] = await this._getOverflowInfo();
|
||||
({ isOverflowing, targetContentWidth } = await this._getOverflowInfo());
|
||||
// Stop if the window has closed or if we re-enter while waiting for
|
||||
// layout.
|
||||
if (win.closed || this._checkOverflowHandle != checkOverflowHandle) {
|
||||
|
@ -5364,7 +5363,7 @@ OverflowableToolbar.prototype = {
|
|||
|
||||
if (!shouldMoveAllItems && minSize) {
|
||||
if (!totalAvailWidth) {
|
||||
[, totalAvailWidth] = await this._getOverflowInfo();
|
||||
({ totalAvailWidth } = await this._getOverflowInfo());
|
||||
|
||||
// If the window has closed or if we re-enter because we were waiting
|
||||
// for layout, stop.
|
||||
|
@ -5441,7 +5440,7 @@ OverflowableToolbar.prototype = {
|
|||
let checkOverflowHandle = (this._checkOverflowHandle = {});
|
||||
|
||||
lazy.log.debug("Checking overflow");
|
||||
let [isOverflowing, totalAvailWidth] = await this._getOverflowInfo();
|
||||
let { isOverflowing, totalAvailWidth } = await this._getOverflowInfo();
|
||||
if (win.closed || this._checkOverflowHandle != checkOverflowHandle) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<box id="customization-content-container">
|
||||
<box flex="1" id="customization-palette-container">
|
||||
<box id="customization-palette-container">
|
||||
<label id="customization-header" data-l10n-id="customize-mode-menu-and-toolbars-header"></label>
|
||||
<vbox id="customization-palette" class="customization-palette" hidden="true"/>
|
||||
<html:div id="customization-pong-arena" hidden="true"/>
|
||||
|
|
|
@ -6,6 +6,8 @@ support-files =
|
|||
[browser_694291_searchbar_preference.js]
|
||||
[browser_873501_handle_specials.js]
|
||||
[browser_876926_customize_mode_wrapping.js]
|
||||
skip-if =
|
||||
(os == "linux") && !debug # Bug 1682752
|
||||
[browser_876944_customize_mode_create_destroy.js]
|
||||
[browser_877006_missing_view.js]
|
||||
[browser_877178_unregisterArea.js]
|
||||
|
|
|
@ -167,7 +167,7 @@ const DoHConfigController = {
|
|||
// consumer use.
|
||||
currentConfig: makeBaseConfigObject(),
|
||||
|
||||
// Loads the client's region via Region.jsm. This might mean waiting
|
||||
// Loads the client's region via Region.sys.mjs. This might mean waiting
|
||||
// until the region is available.
|
||||
async loadRegion() {
|
||||
await new Promise(resolve => {
|
||||
|
|
|
@ -50,7 +50,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
|||
return new ConsoleAPI({
|
||||
prefix: "Policies.jsm",
|
||||
// tip: set maxLogLevel to "debug" and use log.debug() to create detailed
|
||||
// messages during development. See LOG_LEVELS in Console.jsm for details.
|
||||
// messages during development. See LOG_LEVELS in Console.sys.mjs for details.
|
||||
maxLogLevel: "error",
|
||||
maxLogLevelPref: PREF_LOGLEVEL,
|
||||
});
|
||||
|
|
|
@ -15,7 +15,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
|||
return new ConsoleAPI({
|
||||
prefix: "ProxyPolicies.jsm",
|
||||
// tip: set maxLogLevel to "debug" and use log.debug() to create detailed
|
||||
// messages during development. See LOG_LEVELS in Console.jsm for details.
|
||||
// messages during development. See LOG_LEVELS in Console.sys.mjs for details.
|
||||
maxLogLevel: "error",
|
||||
maxLogLevelPref: PREF_LOGLEVEL,
|
||||
});
|
||||
|
|
|
@ -39,7 +39,7 @@ XPCOMUtils.defineLazyGetter(lazy, "log", () => {
|
|||
return new ConsoleAPI({
|
||||
prefix: "WebsiteFilter Policy",
|
||||
// tip: set maxLogLevel to "debug" and use log.debug() to create detailed
|
||||
// messages during development. See LOG_LEVELS in Console.jsm for details.
|
||||
// messages during development. See LOG_LEVELS in Console.sys.mjs for details.
|
||||
maxLogLevel: "error",
|
||||
maxLogLevelPref: PREF_LOGLEVEL,
|
||||
});
|
||||
|
|
|
@ -57,6 +57,15 @@ add_task(async function test_update_about_ui() {
|
|||
"The About Dialog panel Id should equal " + panelId
|
||||
);
|
||||
|
||||
// Make sure that we still remain on the "disabled by policy" panel after
|
||||
// `AppUpdater.stop()` is called.
|
||||
aboutDialog.gAppUpdater._appUpdater.stop();
|
||||
is(
|
||||
aboutDialog.gAppUpdater.selectedPanel.id,
|
||||
panelId,
|
||||
"The About Dialog panel Id should still equal " + panelId
|
||||
);
|
||||
|
||||
aboutDialog.close();
|
||||
});
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ add_task(async function test_local_addon_update() {
|
|||
let xpi1 = AddonTestUtils.createTempWebExtensionFile({
|
||||
manifest: {
|
||||
version: "1.0",
|
||||
applications: {
|
||||
browser_specific_settings: {
|
||||
gecko: { id },
|
||||
},
|
||||
},
|
||||
|
@ -60,7 +60,7 @@ add_task(async function test_local_addon_update() {
|
|||
let xpi2 = AddonTestUtils.createTempWebExtensionFile({
|
||||
manifest: {
|
||||
version: "2.0",
|
||||
applications: {
|
||||
browser_specific_settings: {
|
||||
gecko: { id },
|
||||
},
|
||||
},
|
||||
|
@ -99,7 +99,7 @@ add_task(async function test_newurl_addon_update() {
|
|||
let xpi1 = AddonTestUtils.createTempWebExtensionFile({
|
||||
manifest: {
|
||||
version: "1.0",
|
||||
applications: {
|
||||
browser_specific_settings: {
|
||||
gecko: { id },
|
||||
},
|
||||
},
|
||||
|
@ -109,7 +109,7 @@ add_task(async function test_newurl_addon_update() {
|
|||
let xpi2 = AddonTestUtils.createTempWebExtensionFile({
|
||||
manifest: {
|
||||
version: "2.0",
|
||||
applications: {
|
||||
browser_specific_settings: {
|
||||
gecko: { id },
|
||||
},
|
||||
},
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { Checker } = ChromeUtils.import(
|
||||
"resource://gre/modules/UpdateService.jsm"
|
||||
);
|
||||
const { TelemetryTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/TelemetryTestUtils.jsm"
|
||||
);
|
||||
|
@ -40,8 +37,10 @@ async function test_update_pin(pinString, pinIsValid = true) {
|
|||
"AppUpdatePin policy should only be active if the pin was valid."
|
||||
);
|
||||
|
||||
let checker = new Checker();
|
||||
let updateURL = await checker.getUpdateURL();
|
||||
let checker = Cc["@mozilla.org/updates/update-checker;1"].getService(
|
||||
Ci.nsIUpdateChecker
|
||||
);
|
||||
let updateURL = await checker.getUpdateURL(checker.BACKGROUND_CHECK);
|
||||
|
||||
let expected = pinIsValid
|
||||
? `https://www.example.com/update.xml?pin=${pinString}`
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
let { Checker } = ChromeUtils.import(
|
||||
"resource://gre/modules/UpdateService.jsm"
|
||||
);
|
||||
|
||||
add_task(async function test_app_update_URL() {
|
||||
await setupPolicyEngineWithJson({
|
||||
policies: {
|
||||
|
@ -20,8 +16,10 @@ add_task(async function test_app_update_URL() {
|
|||
"Engine is active"
|
||||
);
|
||||
|
||||
let checker = new Checker();
|
||||
let expected = await checker.getUpdateURL();
|
||||
let checker = Cc["@mozilla.org/updates/update-checker;1"].getService(
|
||||
Ci.nsIUpdateChecker
|
||||
);
|
||||
let expected = await checker.getUpdateURL(checker.BACKGROUND_CHECK);
|
||||
|
||||
equal("https://www.example.com/", expected, "Correct app update URL");
|
||||
});
|
||||
|
|
|
@ -23,7 +23,7 @@ add_task(async function setup() {
|
|||
|
||||
let webExtensionFile = AddonTestUtils.createTempWebExtensionFile({
|
||||
manifest: {
|
||||
applications: {
|
||||
browser_specific_settings: {
|
||||
gecko: {
|
||||
id: addonID,
|
||||
},
|
||||
|
|
|
@ -26,7 +26,7 @@ add_task(async function setup() {
|
|||
|
||||
let webExtensionFile = AddonTestUtils.createTempWebExtensionFile({
|
||||
manifest: {
|
||||
applications: {
|
||||
browser_specific_settings: {
|
||||
gecko: {
|
||||
id: addonID,
|
||||
},
|
||||
|
@ -229,7 +229,7 @@ add_task(async function test_extensionsettings_string() {
|
|||
add_task(async function test_theme() {
|
||||
let themeFile = AddonTestUtils.createTempWebExtensionFile({
|
||||
manifest: {
|
||||
applications: {
|
||||
browser_specific_settings: {
|
||||
gecko: {
|
||||
id: themeID,
|
||||
},
|
||||
|
|
|
@ -126,8 +126,7 @@ function _createContainer() {
|
|||
container.id = CONTAINER_ID;
|
||||
container.setAttribute("aria-describedby", `#${CONTAINER_ID} .welcome-text`);
|
||||
container.tabIndex = 0;
|
||||
parent.setAttribute("aria-owns", `${CONTAINER_ID}`);
|
||||
document.body.appendChild(container);
|
||||
document.body.prepend(container);
|
||||
return container;
|
||||
}
|
||||
|
||||
|
@ -495,8 +494,6 @@ async function showFeatureCallout(messageId) {
|
|||
window.addEventListener("focus", focusHandler, {
|
||||
capture: true, // get the event before retargeting
|
||||
});
|
||||
// Alert screen readers to the presence of the callout
|
||||
container.setAttribute("role", "alert");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -11,9 +11,7 @@ const RECENT_TABS_SYNC = "services.sync.lastTabFetch";
|
|||
const SHOULD_NOTIFY_FOR_TABS = "browser.tabs.firefox-view.notify-for-tabs";
|
||||
const lazy = {};
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(lazy, {
|
||||
BrowserWindowTracker: "resource:///modules/BrowserWindowTracker.jsm",
|
||||
|
|
|
@ -7,9 +7,7 @@
|
|||
* diverse inputs which drive the Firefox View synced tabs setup flow
|
||||
*/
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
@ -190,13 +188,12 @@ export const TabsSetupFlowManager = new (class {
|
|||
const errorStates = {
|
||||
"network-offline": !this.networkIsOnline,
|
||||
"fxa-admin-disabled": Services.prefs.prefIsLocked(FXA_ENABLED),
|
||||
"password-locked": this.isPrimaryPasswordLocked,
|
||||
"sync-disconnected":
|
||||
!this.syncIsConnected ||
|
||||
(this.syncIsConnected &&
|
||||
lazy.UIState.get().status === lazy.UIState.STATUS_LOGIN_FAILED),
|
||||
"sync-error":
|
||||
(!this.syncIsWorking && !this.syncHasWorked) ||
|
||||
this.isPrimaryPasswordLocked,
|
||||
"sync-error": !this.syncIsWorking && !this.syncHasWorked,
|
||||
};
|
||||
|
||||
for (let [type, value] of Object.entries(errorStates)) {
|
||||
|
@ -411,7 +408,7 @@ export const TabsSetupFlowManager = new (class {
|
|||
this.logger.debug("onSignedInChange, no recentTabs, calling syncTabs");
|
||||
// If the syncTabs call rejects or resolves false we need to clear the waiting
|
||||
// flag and update UI
|
||||
lazy.SyncedTabs.syncTabs()
|
||||
this.syncTabs()
|
||||
.catch(ex => {
|
||||
this.logger.debug("onSignedInChange, syncTabs rejected:", ex);
|
||||
this.stopWaitingForTabs();
|
||||
|
@ -563,7 +560,7 @@ export const TabsSetupFlowManager = new (class {
|
|||
async syncOnPageReload() {
|
||||
if (lazy.UIState.isReady() && this.fxaSignedIn) {
|
||||
this.startWaitingForTabs();
|
||||
await lazy.SyncedTabs.syncTabs(true);
|
||||
await this.syncTabs(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -572,7 +569,7 @@ export const TabsSetupFlowManager = new (class {
|
|||
this.startWaitingForTabs();
|
||||
Services.tm.dispatchToMainThread(() => {
|
||||
this.logger.debug("tryToClearError: triggering new tab sync");
|
||||
lazy.Weave.Service.sync({ why: "tabs", engines: ["tabs"] });
|
||||
this.startFullTabsSync();
|
||||
});
|
||||
} else {
|
||||
this.logger.debug(
|
||||
|
@ -582,4 +579,12 @@ export const TabsSetupFlowManager = new (class {
|
|||
);
|
||||
}
|
||||
}
|
||||
// For easy overriding in tests
|
||||
syncTabs(force = false) {
|
||||
return lazy.SyncedTabs.syncTabs(force);
|
||||
}
|
||||
|
||||
startFullTabsSync() {
|
||||
lazy.Weave.Service.sync({ why: "tabs", engines: ["tabs"] });
|
||||
}
|
||||
})();
|
||||
|
|
|
@ -640,6 +640,7 @@ details[open] > .page-section-header > .twisty {
|
|||
padding: 8px;
|
||||
cursor: pointer;
|
||||
align-items: center;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@media (prefers-contrast) {
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
<section>
|
||||
<p>
|
||||
<span id="error-state-description"></span>
|
||||
<a id="error-state-link" target="_blank" hidden></a>
|
||||
</p>
|
||||
<button id="error-state-button" class="primary"></button>
|
||||
</section>
|
||||
|
|
|
@ -57,7 +57,8 @@ class TabPickupContainer extends HTMLDetailsElement {
|
|||
if (event.type == "click" && event.target.dataset.action) {
|
||||
switch (event.target.dataset.action) {
|
||||
case "view0-sync-error-action":
|
||||
case "view0-network-offline-action": {
|
||||
case "view0-network-offline-action":
|
||||
case "view0-password-locked-action": {
|
||||
TabsSetupFlowManager.tryToClearError();
|
||||
break;
|
||||
}
|
||||
|
@ -205,6 +206,18 @@ class TabPickupContainer extends HTMLDetailsElement {
|
|||
description: "firefoxview-tabpickup-sync-disconnected-description",
|
||||
buttonLabel: "firefoxview-tabpickup-sync-disconnected-primarybutton",
|
||||
},
|
||||
|
||||
"password-locked": {
|
||||
header: "firefoxview-tabpickup-password-locked-header",
|
||||
description: "firefoxview-tabpickup-password-locked-description",
|
||||
buttonLabel: "firefoxview-tabpickup-password-locked-primarybutton",
|
||||
link: {
|
||||
label: "firefoxview-tabpickup-password-locked-link",
|
||||
href:
|
||||
Services.urlFormatter.formatURLPref("app.support.baseURL") +
|
||||
"primary-password-stored-logins",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
const errorStateHeader = this.querySelector(
|
||||
|
@ -214,14 +227,13 @@ class TabPickupContainer extends HTMLDetailsElement {
|
|||
"#error-state-description"
|
||||
);
|
||||
const errorStateButton = this.querySelector("#error-state-button");
|
||||
const errorStateLink = this.querySelector("#error-state-link");
|
||||
const errorStateProperties = errorStateStringMappings[this.errorState];
|
||||
|
||||
document.l10n.setAttributes(
|
||||
errorStateHeader,
|
||||
errorStateStringMappings[this.errorState].header
|
||||
);
|
||||
document.l10n.setAttributes(errorStateHeader, errorStateProperties.header);
|
||||
document.l10n.setAttributes(
|
||||
errorStateDescription,
|
||||
errorStateStringMappings[this.errorState].description
|
||||
errorStateProperties.description
|
||||
);
|
||||
|
||||
errorStateButton.hidden = this.errorState == "fxa-admin-disabled";
|
||||
|
@ -229,13 +241,24 @@ class TabPickupContainer extends HTMLDetailsElement {
|
|||
if (this.errorState != "fxa-admin-disabled") {
|
||||
document.l10n.setAttributes(
|
||||
errorStateButton,
|
||||
errorStateStringMappings[this.errorState].buttonLabel
|
||||
errorStateProperties.buttonLabel
|
||||
);
|
||||
errorStateButton.setAttribute(
|
||||
"data-action",
|
||||
`view0-${this.errorState}-action`
|
||||
);
|
||||
}
|
||||
|
||||
if (errorStateProperties.link) {
|
||||
document.l10n.setAttributes(
|
||||
errorStateLink,
|
||||
errorStateProperties.link.label
|
||||
);
|
||||
errorStateLink.href = errorStateProperties.link.href;
|
||||
errorStateLink.hidden = false;
|
||||
} else {
|
||||
errorStateLink.hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
|
@ -67,10 +67,6 @@ add_task(async function feature_callout_is_accessible() {
|
|||
() => document.activeElement.id === calloutId,
|
||||
"Feature Callout is focused on page load"
|
||||
);
|
||||
await BrowserTestUtils.waitForCondition(
|
||||
() => document.querySelector(`${calloutSelector}[role="alert"]`),
|
||||
"The callout container has role of alert"
|
||||
);
|
||||
await BrowserTestUtils.waitForCondition(
|
||||
() =>
|
||||
document.querySelector(
|
||||
|
@ -97,10 +93,6 @@ add_task(async function feature_callout_is_accessible() {
|
|||
() => document.activeElement.id === calloutId,
|
||||
"Feature Callout is focused after advancing screens"
|
||||
);
|
||||
await BrowserTestUtils.waitForCondition(
|
||||
() => document.querySelector(`${calloutSelector}[role="alert"]`),
|
||||
"The callout container has role of alert after advancing screens"
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
|
@ -5,6 +5,10 @@ const { TabsSetupFlowManager } = ChromeUtils.importESModule(
|
|||
"resource:///modules/firefox-view-tabs-setup-manager.sys.mjs"
|
||||
);
|
||||
|
||||
const { LoginTestUtils } = ChromeUtils.import(
|
||||
"resource://testing-common/LoginTestUtils.jsm"
|
||||
);
|
||||
|
||||
async function setupWithDesktopDevices(state = UIState.STATUS_SIGNED_IN) {
|
||||
const sandbox = setupSyncFxAMocks({
|
||||
state,
|
||||
|
@ -32,7 +36,6 @@ async function tearDown(sandbox) {
|
|||
}
|
||||
|
||||
add_setup(async function() {
|
||||
await promiseSyncReady();
|
||||
// gSync.init() is called in a requestIdleCallback. Force its initialization.
|
||||
gSync.init();
|
||||
|
||||
|
@ -308,3 +311,66 @@ add_task(async function test_password_change_disconnect_error() {
|
|||
});
|
||||
await tearDown(sandbox);
|
||||
});
|
||||
|
||||
add_task(async function test_multiple_errors() {
|
||||
let sandbox = await setupWithDesktopDevices();
|
||||
await withFirefoxView({}, async browser => {
|
||||
const { document } = browser.contentWindow;
|
||||
// Simulate conditions in which both the locked password and sync error
|
||||
// messages could be shown
|
||||
LoginTestUtils.primaryPassword.enable();
|
||||
Services.obs.notifyObservers(null, UIState.ON_UPDATE);
|
||||
Services.obs.notifyObservers(null, "weave:service:sync:error");
|
||||
|
||||
info("Waiting for the primary password error message to be shown");
|
||||
await waitForElementVisible(browser, "#tabpickup-steps", true);
|
||||
await waitForVisibleSetupStep(browser, {
|
||||
expectedVisible: "#tabpickup-steps-view0",
|
||||
});
|
||||
|
||||
const errorStateHeader = document.querySelector(
|
||||
"#tabpickup-steps-view0-header"
|
||||
);
|
||||
await BrowserTestUtils.waitForMutationCondition(
|
||||
errorStateHeader,
|
||||
{ childList: true },
|
||||
() => errorStateHeader.textContent.includes("Enter your Primary Password")
|
||||
);
|
||||
|
||||
ok(
|
||||
errorStateHeader.getAttribute("data-l10n-id").includes("password-locked"),
|
||||
"Password locked error message is shown"
|
||||
);
|
||||
|
||||
const errorLink = document.querySelector("#error-state-link");
|
||||
ok(
|
||||
errorLink && BrowserTestUtils.is_visible(errorLink),
|
||||
"Error link is visible"
|
||||
);
|
||||
|
||||
// Clear the primary password error message
|
||||
LoginTestUtils.primaryPassword.disable();
|
||||
Services.obs.notifyObservers(null, UIState.ON_UPDATE);
|
||||
|
||||
info("Waiting for the sync error message to be shown");
|
||||
await BrowserTestUtils.waitForMutationCondition(
|
||||
errorStateHeader,
|
||||
{ childList: true },
|
||||
() => errorStateHeader.textContent.includes("trouble syncing")
|
||||
);
|
||||
|
||||
ok(
|
||||
errorStateHeader.getAttribute("data-l10n-id").includes("sync-error"),
|
||||
"Sync error message is now shown"
|
||||
);
|
||||
|
||||
ok(
|
||||
errorLink && BrowserTestUtils.is_hidden(errorLink),
|
||||
"Error link is now hidden"
|
||||
);
|
||||
|
||||
// Clear the sync error
|
||||
Services.obs.notifyObservers(null, "weave:service:sync:finish");
|
||||
});
|
||||
await tearDown(sandbox);
|
||||
});
|
||||
|
|
|
@ -36,6 +36,11 @@ add_task(async function test_primary_password_locked() {
|
|||
const sandbox = setupMocks();
|
||||
|
||||
await withFirefoxView({}, async browser => {
|
||||
sandbox
|
||||
.stub(TabsSetupFlowManager, "syncTabs")
|
||||
.returns(Promise.resolve(null));
|
||||
sandbox.stub(TabsSetupFlowManager, "startFullTabsSync").returns(undefined);
|
||||
|
||||
const { document } = browser.contentWindow;
|
||||
Services.obs.notifyObservers(null, UIState.ON_UPDATE);
|
||||
|
||||
|
@ -43,6 +48,31 @@ add_task(async function test_primary_password_locked() {
|
|||
await waitForVisibleSetupStep(browser, {
|
||||
expectedVisible: "#tabpickup-steps-view0",
|
||||
});
|
||||
|
||||
const errorStateHeader = document.querySelector(
|
||||
"#tabpickup-steps-view0-header"
|
||||
);
|
||||
await BrowserTestUtils.waitForMutationCondition(
|
||||
errorStateHeader,
|
||||
{ childList: true },
|
||||
() => errorStateHeader.textContent.includes("Enter your Primary Password")
|
||||
);
|
||||
|
||||
ok(
|
||||
errorStateHeader.getAttribute("data-l10n-id").includes("password-locked"),
|
||||
"Correct error message is shown"
|
||||
);
|
||||
|
||||
const errorLink = document.querySelector("#error-state-link");
|
||||
ok(
|
||||
errorLink && BrowserTestUtils.is_visible(errorLink),
|
||||
"Error link is visible"
|
||||
);
|
||||
ok(
|
||||
errorLink.getAttribute("data-l10n-id").includes("password-locked-link"),
|
||||
"Correct link text is shown"
|
||||
);
|
||||
|
||||
const primaryButton = document.querySelector("#error-state-button");
|
||||
ok(
|
||||
primaryButton && BrowserTestUtils.is_visible(primaryButton),
|
||||
|
@ -72,6 +102,9 @@ add_task(async function test_primary_password_locked() {
|
|||
|
||||
info("notifying of the primary-password unlock");
|
||||
const clearErrorSpy = sandbox.spy(TabsSetupFlowManager, "tryToClearError");
|
||||
// we stubbed out sync, so pretend it ran.
|
||||
info("notifying of sync:finish");
|
||||
Services.obs.notifyObservers(null, "weave:service:sync:finish");
|
||||
|
||||
const setupContainer = document.querySelector(".sync-setup-container");
|
||||
// wait until the setup container gets hidden before checking if the tabs container is visible
|
||||
|
@ -113,5 +146,5 @@ add_task(async function test_primary_password_locked() {
|
|||
"Synced tabs isn't loading any more"
|
||||
);
|
||||
});
|
||||
tearDown();
|
||||
await tearDown(sandbox);
|
||||
});
|
||||
|
|
|
@ -48,14 +48,6 @@ function setupMocks({ fxaDevices = null, state, syncEnabled = true }) {
|
|||
}),
|
||||
};
|
||||
});
|
||||
sandbox
|
||||
.stub(Weave.Service.clientsEngine, "getClientByFxaDeviceId")
|
||||
.callsFake(fxaDeviceId => {
|
||||
let target = gMockFxaDevices.find(c => c.id == fxaDeviceId);
|
||||
return target ? target.clientRecord : null;
|
||||
});
|
||||
sandbox.stub(Weave.Service.clientsEngine, "getClientType").returns("desktop");
|
||||
|
||||
return sandbox;
|
||||
}
|
||||
|
||||
|
@ -95,7 +87,6 @@ add_setup(async function() {
|
|||
TabsSetupFlowManager.resetInternalState();
|
||||
});
|
||||
|
||||
await promiseSyncReady();
|
||||
// gSync.init() is called in a requestIdleCallback. Force its initialization.
|
||||
gSync.init();
|
||||
|
||||
|
|
|
@ -83,7 +83,6 @@ add_setup(async function() {
|
|||
TabsSetupFlowManager.resetInternalState();
|
||||
});
|
||||
|
||||
await promiseSyncReady();
|
||||
// gSync.init() is called in a requestIdleCallback. Force its initialization.
|
||||
gSync.init();
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@ add_setup(async function() {
|
|||
TabsSetupFlowManager.resetInternalState();
|
||||
});
|
||||
|
||||
await promiseSyncReady();
|
||||
// gSync.init() is called in a requestIdleCallback. Force its initialization.
|
||||
gSync.init();
|
||||
});
|
||||
|
|
|
@ -60,12 +60,6 @@ const syncedTabsData1 = [
|
|||
},
|
||||
];
|
||||
|
||||
function promiseSyncReady() {
|
||||
let service = Cc["@mozilla.org/weave/service;1"].getService(Ci.nsISupports)
|
||||
.wrappedJSObject;
|
||||
return service.whenLoaded();
|
||||
}
|
||||
|
||||
async function clearAllParentTelemetryEvents() {
|
||||
// Clear everything.
|
||||
await TestUtils.waitForCondition(() => {
|
||||
|
@ -238,13 +232,6 @@ function setupSyncFxAMocks({ fxaDevices = null, state, syncEnabled = true }) {
|
|||
syncEnabled,
|
||||
};
|
||||
});
|
||||
sandbox
|
||||
.stub(Weave.Service.clientsEngine, "getClientByFxaDeviceId")
|
||||
.callsFake(fxaDeviceId => {
|
||||
let target = gMockFxaDevices.find(c => c.id == fxaDeviceId);
|
||||
return target ? target.clientRecord : null;
|
||||
});
|
||||
sandbox.stub(Weave.Service.clientsEngine, "getClientType").returns("desktop");
|
||||
|
||||
return sandbox;
|
||||
}
|
||||
|
|
|
@ -534,8 +534,8 @@ class TestFirefoxRefresh(MarionetteTestCase):
|
|||
window.global = {};
|
||||
global.LoginInfo = Components.Constructor("@mozilla.org/login-manager/loginInfo;1", "nsILoginInfo", "init");
|
||||
global.profSvc = Cc["@mozilla.org/toolkit/profile-service;1"].getService(Ci.nsIToolkitProfileService);
|
||||
global.Preferences = ChromeUtils.import(
|
||||
"resource://gre/modules/Preferences.jsm"
|
||||
global.Preferences = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/Preferences.sys.mjs"
|
||||
).Preferences;
|
||||
global.FormHistory = ChromeUtils.import(
|
||||
"resource://gre/modules/FormHistory.jsm"
|
||||
|
|
|
@ -819,7 +819,11 @@ class ProtonScreen extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCom
|
|||
background: content.background,
|
||||
"--mr-secondary-background-position-y": content.split_narrow_bkg_position
|
||||
} : {}
|
||||
}, content.hero_image ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_HeroImage__WEBPACK_IMPORTED_MODULE_8__.HeroImage, {
|
||||
}, content.image_alt_text ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
||||
className: "sr-only image-alt",
|
||||
role: "img",
|
||||
"data-l10n-id": content.image_alt_text.string_id
|
||||
}) : null, content.hero_image ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_HeroImage__WEBPACK_IMPORTED_MODULE_8__.HeroImage, {
|
||||
url: content.hero_image.url
|
||||
}) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
||||
className: "message-text"
|
||||
|
@ -859,7 +863,7 @@ class ProtonScreen extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCom
|
|||
const currentStep = this.props.order + 1;
|
||||
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("main", {
|
||||
className: `screen ${this.props.id || ""} ${screenClassName} ${textColorClass}`,
|
||||
role: "dialog",
|
||||
role: "alertdialog",
|
||||
pos: content.position || "center",
|
||||
tabIndex: "-1",
|
||||
"aria-labelledby": "mainContentHeader",
|
||||
|
|
|
@ -549,6 +549,10 @@ html {
|
|||
text-shadow: none;
|
||||
margin-inline: 40px 0;
|
||||
}
|
||||
.onboardingContainer .screen[pos=split] .section-secondary .image-alt {
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
}
|
||||
.onboardingContainer .screen[pos=split] .section-secondary .hero-image {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
|
|
|
@ -283,6 +283,9 @@ const MR_ABOUT_WELCOME_DEFAULT = {
|
|||
content: {
|
||||
position: "split",
|
||||
split_narrow_bkg_position: "-155px",
|
||||
image_alt_text: {
|
||||
string_id: "mr2022-onboarding-pin-image-alt",
|
||||
},
|
||||
background:
|
||||
"url('chrome://activity-stream/content/data/content/assets/mr-pintaskbar.svg') var(--mr-secondary-position) no-repeat var(--mr-screen-background-color)",
|
||||
progress_bar: true,
|
||||
|
@ -370,6 +373,9 @@ const MR_ABOUT_WELCOME_DEFAULT = {
|
|||
content: {
|
||||
position: "split",
|
||||
split_narrow_bkg_position: "-60px",
|
||||
image_alt_text: {
|
||||
string_id: "mr2022-onboarding-default-image-alt",
|
||||
},
|
||||
background:
|
||||
"url('chrome://activity-stream/content/data/content/assets/mr-settodefault.svg') var(--mr-secondary-position) no-repeat var(--mr-screen-background-color)",
|
||||
progress_bar: true,
|
||||
|
@ -405,6 +411,9 @@ const MR_ABOUT_WELCOME_DEFAULT = {
|
|||
content: {
|
||||
position: "split",
|
||||
split_narrow_bkg_position: "-42px",
|
||||
image_alt_text: {
|
||||
string_id: "mr2022-onboarding-import-image-alt",
|
||||
},
|
||||
background:
|
||||
"url('chrome://activity-stream/content/data/content/assets/mr-import.svg') var(--mr-secondary-position) no-repeat var(--mr-screen-background-color)",
|
||||
progress_bar: true,
|
||||
|
@ -442,6 +451,9 @@ const MR_ABOUT_WELCOME_DEFAULT = {
|
|||
content: {
|
||||
position: "split",
|
||||
split_narrow_bkg_position: "-65px",
|
||||
image_alt_text: {
|
||||
string_id: "mr2022-onboarding-colorways-image-alt",
|
||||
},
|
||||
background:
|
||||
"url('chrome://activity-stream/content/data/content/assets/mr-colorways.avif') var(--mr-secondary-position) no-repeat var(--mr-screen-background-color)",
|
||||
progress_bar: true,
|
||||
|
@ -580,6 +592,9 @@ const MR_ABOUT_WELCOME_DEFAULT = {
|
|||
content: {
|
||||
position: "split",
|
||||
split_narrow_bkg_position: "-160px",
|
||||
image_alt_text: {
|
||||
string_id: "mr2022-onboarding-mobile-download-image-alt",
|
||||
},
|
||||
background:
|
||||
"url('chrome://activity-stream/content/data/content/assets/mr-mobilecrosspromo.svg') var(--mr-secondary-position) no-repeat var(--mr-screen-background-color)",
|
||||
progress_bar: true,
|
||||
|
@ -624,6 +639,9 @@ const MR_ABOUT_WELCOME_DEFAULT = {
|
|||
content: {
|
||||
position: "split",
|
||||
split_narrow_bkg_position: "-228px",
|
||||
image_alt_text: {
|
||||
string_id: "mr2022-onboarding-gratitude-image-alt",
|
||||
},
|
||||
background:
|
||||
"url('chrome://activity-stream/content/data/content/assets/mr-gratitude.svg') var(--mr-secondary-position) no-repeat var(--mr-screen-background-color)",
|
||||
progress_bar: true,
|
||||
|
@ -884,7 +902,7 @@ async function prepareContentForReact(content) {
|
|||
|
||||
// Get started content will navigate without action, so remove "Not now."
|
||||
if (removeDefault) {
|
||||
delete pinScreen.content.secondary_button;
|
||||
if (!content.templateMR) delete pinScreen.content.secondary_button;
|
||||
} else {
|
||||
// The "pin" screen will now handle "default" so remove other "default."
|
||||
pinScreen.content.primary_button.action.type = "SET_DEFAULT_BROWSER";
|
||||
|
|
|
@ -483,6 +483,11 @@ html {
|
|||
margin-inline: 40px 0;
|
||||
}
|
||||
|
||||
.image-alt {
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.hero-image {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
|
|
|
@ -240,6 +240,13 @@ export class ProtonScreen extends React.PureComponent {
|
|||
: {}
|
||||
}
|
||||
>
|
||||
{content.image_alt_text ? (
|
||||
<div
|
||||
className="sr-only image-alt"
|
||||
role="img"
|
||||
data-l10n-id={content.image_alt_text.string_id}
|
||||
/>
|
||||
) : null}
|
||||
{content.hero_image ? (
|
||||
<HeroImage url={content.hero_image.url} />
|
||||
) : (
|
||||
|
@ -294,7 +301,7 @@ export class ProtonScreen extends React.PureComponent {
|
|||
<main
|
||||
className={`screen ${this.props.id ||
|
||||
""} ${screenClassName} ${textColorClass}`}
|
||||
role="dialog"
|
||||
role="alertdialog"
|
||||
pos={content.position || "center"}
|
||||
tabIndex="-1"
|
||||
aria-labelledby="mainContentHeader"
|
||||
|
|
|
@ -527,7 +527,7 @@ declare const totalBlockedCount: number;
|
|||
|
||||
### `recentBookmarks`
|
||||
|
||||
An array of GUIDs of recent bookmarks as provided by [`NewTabUtils.getRecentBookmarks`](https://searchfox.org/mozilla-central/rev/e0b0c38ee83f99d3cf868bad525ace4a395039f1/toolkit/modules/NewTabUtils.jsm#1087)
|
||||
An array of GUIDs of recent bookmarks as provided by [`NewTabUtils.getRecentBookmarks`](https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/toolkit/modules/NewTabUtils.sys.mjs#1059)
|
||||
|
||||
#### Definition
|
||||
|
||||
|
@ -589,7 +589,7 @@ declare const attachedFxAOAuthClients: Promise<OAuthClient[]>
|
|||
|
||||
### `platformName`
|
||||
|
||||
[Platform information](https://searchfox.org/mozilla-central/rev/05a22d864814cb1e4352faa4004e1f975c7d2eb9/toolkit/modules/AppConstants.jsm#156).
|
||||
[Platform information](https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/toolkit/modules/AppConstants.sys.mjs#153).
|
||||
|
||||
#### Definition
|
||||
|
||||
|
|
|
@ -1403,6 +1403,11 @@ class _ASRouter {
|
|||
const [item] = items.filter(x => x.id === id);
|
||||
// Don't keep impressions for items that no longer exist
|
||||
if (!item || !item.frequency || !Array.isArray(impressions[id])) {
|
||||
lazy.ASRouterPreferences.console.debug(
|
||||
"Cleaning up Impression ",
|
||||
impressions[id]
|
||||
);
|
||||
lazy.ASRouterPreferences.console.trace();
|
||||
delete impressions[id];
|
||||
needsUpdate = true;
|
||||
return;
|
||||
|
@ -1750,14 +1755,16 @@ class _ASRouter {
|
|||
}));
|
||||
}
|
||||
|
||||
// Check and filter out messages of any disabled PromoType
|
||||
// Remove from state pb_newtab messages with PromoType disabled
|
||||
await this.setState(state => ({
|
||||
messages: state.messages.filter(
|
||||
m =>
|
||||
m.template === "pb_newtab" &&
|
||||
Services.prefs.getBoolPref(
|
||||
PromoInfo[m.content?.promoType]?.enabledPref,
|
||||
true
|
||||
!(
|
||||
m.template === "pb_newtab" &&
|
||||
!Services.prefs.getBoolPref(
|
||||
PromoInfo[m.content?.promoType]?.enabledPref,
|
||||
true
|
||||
)
|
||||
)
|
||||
),
|
||||
}));
|
||||
|
|
|
@ -115,11 +115,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||
);
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetters(lazy, {
|
||||
AUS: ["@mozilla.org/updates/update-service;1", "nsIApplicationUpdateService"],
|
||||
BrowserHandler: ["@mozilla.org/browser/clh;1", "nsIBrowserHandler"],
|
||||
TrackingDBService: [
|
||||
"@mozilla.org/tracking-db-service;1",
|
||||
"nsITrackingDBService",
|
||||
],
|
||||
UpdateCheckSvc: ["@mozilla.org/updates/update-checker;1", "nsIUpdateChecker"],
|
||||
});
|
||||
|
||||
const FXA_USERNAME_PREF = "services.sync.username";
|
||||
|
@ -195,7 +197,6 @@ function CacheListAttachedOAuthClients() {
|
|||
function CheckBrowserNeedsUpdate(
|
||||
updateInterval = FRECENT_SITES_UPDATE_INTERVAL
|
||||
) {
|
||||
const UpdateChecker = Cc["@mozilla.org/updates/update-checker;1"];
|
||||
const checker = {
|
||||
_lastUpdated: 0,
|
||||
_value: null,
|
||||
|
@ -208,37 +209,27 @@ function CheckBrowserNeedsUpdate(
|
|||
this._lastUpdated = 0;
|
||||
this._value = null;
|
||||
},
|
||||
get() {
|
||||
return new Promise((resolve, reject) => {
|
||||
const now = Date.now();
|
||||
const updateServiceListener = {
|
||||
// eslint-disable-next-line require-await
|
||||
async onCheckComplete(request, updates) {
|
||||
checker._value = !!updates.length;
|
||||
resolve(checker._value);
|
||||
},
|
||||
// eslint-disable-next-line require-await
|
||||
async onError(request, update) {
|
||||
reject(request);
|
||||
},
|
||||
|
||||
QueryInterface: ChromeUtils.generateQI(["nsIUpdateCheckListener"]),
|
||||
};
|
||||
|
||||
if (UpdateChecker && now - this._lastUpdated >= updateInterval) {
|
||||
const checkerInstance = UpdateChecker.createInstance(
|
||||
Ci.nsIUpdateChecker
|
||||
);
|
||||
if (checkerInstance.canCheckForUpdates) {
|
||||
checkerInstance.checkForUpdates(updateServiceListener, true);
|
||||
this._lastUpdated = now;
|
||||
} else {
|
||||
resolve(false);
|
||||
}
|
||||
} else {
|
||||
resolve(this._value);
|
||||
}
|
||||
});
|
||||
async get() {
|
||||
const now = Date.now();
|
||||
if (
|
||||
!AppConstants.MOZ_UPDATER ||
|
||||
now - this._lastUpdated < updateInterval
|
||||
) {
|
||||
return this._value;
|
||||
}
|
||||
if (!lazy.AUS.canCheckForUpdates) {
|
||||
return false;
|
||||
}
|
||||
this._lastUpdated = now;
|
||||
let check = lazy.UpdateCheckSvc.checkForUpdates(
|
||||
lazy.UpdateCheckSvc.FOREGROUND_CHECK
|
||||
);
|
||||
let result = await check.result;
|
||||
if (!result.succeeded) {
|
||||
throw result.request;
|
||||
}
|
||||
checker._value = !!result.updates.length;
|
||||
return checker._value;
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -806,7 +806,7 @@ class PageAction {
|
|||
const { content } = message;
|
||||
|
||||
// A hacky way of setting the popup anchor outside the usual url bar icon box
|
||||
// See https://searchfox.org/mozilla-central/rev/847b64cc28b74b44c379f9bff4f415b97da1c6d7/toolkit/modules/PopupNotifications.jsm#42
|
||||
// See https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/toolkit/modules/PopupNotifications.sys.mjs#40
|
||||
browser.cfrpopupnotificationanchor =
|
||||
this.window.document.getElementById(content.anchor_id) || this.container;
|
||||
|
||||
|
@ -819,7 +819,7 @@ class PageAction {
|
|||
const { content } = message;
|
||||
|
||||
// A hacky way of setting the popup anchor outside the usual url bar icon box
|
||||
// See https://searchfox.org/mozilla-central/rev/847b64cc28b74b44c379f9bff4f415b97da1c6d7/toolkit/modules/PopupNotifications.jsm#42
|
||||
// See https://searchfox.org/mozilla-central/rev/c5c002f81f08a73e04868e0c2bf0eb113f200b03/toolkit/modules/PopupNotifications.sys.mjs#40
|
||||
browser.cfrpopupnotificationanchor =
|
||||
this.window.document.getElementById(content.anchor_id) || this.container;
|
||||
|
||||
|
|
|
@ -146,6 +146,9 @@ const BASE_MESSAGES = () => [
|
|||
content: {
|
||||
position: "split",
|
||||
split_narrow_bkg_position: "-155px",
|
||||
image_alt_text: {
|
||||
string_id: "mr2022-onboarding-pin-image-alt",
|
||||
},
|
||||
progress_bar: "true",
|
||||
background:
|
||||
"url('chrome://activity-stream/content/data/content/assets/mr-pintaskbar.svg') var(--mr-secondary-position) no-repeat var(--mr-screen-background-color)",
|
||||
|
@ -204,6 +207,9 @@ const BASE_MESSAGES = () => [
|
|||
content: {
|
||||
position: "split",
|
||||
split_narrow_bkg_position: "-60px",
|
||||
image_alt_text: {
|
||||
string_id: "mr2022-onboarding-default-image-alt",
|
||||
},
|
||||
progress_bar: "true",
|
||||
background:
|
||||
"url('chrome://activity-stream/content/data/content/assets/mr-settodefault.svg') var(--mr-secondary-position) no-repeat var(--mr-screen-background-color)",
|
||||
|
@ -239,6 +245,9 @@ const BASE_MESSAGES = () => [
|
|||
content: {
|
||||
position: "split",
|
||||
split_narrow_bkg_position: "-42px",
|
||||
image_alt_text: {
|
||||
string_id: "mr2022-onboarding-import-image-alt",
|
||||
},
|
||||
progress_bar: "true",
|
||||
background:
|
||||
"url('chrome://activity-stream/content/data/content/assets/mr-import.svg') var(--mr-secondary-position) no-repeat var(--mr-screen-background-color)",
|
||||
|
@ -276,6 +285,9 @@ const BASE_MESSAGES = () => [
|
|||
content: {
|
||||
position: "split",
|
||||
split_narrow_bkg_position: "-65px",
|
||||
image_alt_text: {
|
||||
string_id: "mr2022-onboarding-colorways-image-alt",
|
||||
},
|
||||
background:
|
||||
"url('chrome://activity-stream/content/data/content/assets/mr-colorways.avif') var(--mr-secondary-position) no-repeat var(--mr-screen-background-color)",
|
||||
progress_bar: true,
|
||||
|
@ -430,6 +442,9 @@ const BASE_MESSAGES = () => [
|
|||
content: {
|
||||
position: "split",
|
||||
split_narrow_bkg_position: "-160px",
|
||||
image_alt_text: {
|
||||
string_id: "mr2022-onboarding-mobile-download-image-alt",
|
||||
},
|
||||
background:
|
||||
"url('chrome://activity-stream/content/data/content/assets/mr-mobilecrosspromo.svg') var(--mr-secondary-position) no-repeat var(--mr-screen-background-color)",
|
||||
progress_bar: true,
|
||||
|
@ -474,6 +489,9 @@ const BASE_MESSAGES = () => [
|
|||
content: {
|
||||
position: "split",
|
||||
split_narrow_bkg_position: "-100px",
|
||||
image_alt_text: {
|
||||
string_id: "mr2022-onboarding-pin-private-image-alt",
|
||||
},
|
||||
progress_bar: "true",
|
||||
background:
|
||||
"url('chrome://activity-stream/content/data/content/assets/mr-pinprivate.svg') var(--mr-secondary-position) no-repeat var(--mr-screen-background-color)",
|
||||
|
@ -514,6 +532,9 @@ const BASE_MESSAGES = () => [
|
|||
content: {
|
||||
position: "split",
|
||||
split_narrow_bkg_position: "-80px",
|
||||
image_alt_text: {
|
||||
string_id: "mr2022-onboarding-privacy-segmentation-image-alt",
|
||||
},
|
||||
progress_bar: "true",
|
||||
dual_action_buttons: true,
|
||||
background:
|
||||
|
@ -570,6 +591,9 @@ const BASE_MESSAGES = () => [
|
|||
position: "split",
|
||||
progress_bar: "true",
|
||||
split_narrow_bkg_position: "-228px",
|
||||
image_alt_text: {
|
||||
string_id: "mr2022-onboarding-gratitude-image-alt",
|
||||
},
|
||||
background:
|
||||
"url('chrome://activity-stream/content/data/content/assets/mr-gratitude.svg') var(--mr-secondary-position) no-repeat var(--mr-screen-background-color)",
|
||||
logo: {},
|
||||
|
@ -1210,7 +1234,6 @@ const OnboardingMessageProvider = {
|
|||
string_id: "mr2022-onboarding-get-started-primary-button-label",
|
||||
};
|
||||
delete primary.action.type;
|
||||
delete pinScreen.content.secondary_button;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -222,11 +222,7 @@ add_task(async function test_aboutwelcome_mr_template_get_started() {
|
|||
//Expected selectors:
|
||||
["main.AW_GET_STARTED"],
|
||||
//Unexpected selectors:
|
||||
[
|
||||
"main.AW_PIN_FIREFOX",
|
||||
"main.AW_ONLY_DEFAULT",
|
||||
".action-buttons .secondary",
|
||||
]
|
||||
["main.AW_PIN_FIREFOX", "main.AW_ONLY_DEFAULT"]
|
||||
);
|
||||
|
||||
await cleanup();
|
||||
|
|
|
@ -132,10 +132,10 @@ add_task(async function test_aboutwelcome_upgrade_mr_prefs_off() {
|
|||
//Expected selectors:
|
||||
["main.UPGRADE_GET_STARTED"],
|
||||
//Unexpected selectors:
|
||||
["main.PIN_FIREFOX", ".action-buttons button.secondary"]
|
||||
["main.PIN_FIREFOX"]
|
||||
);
|
||||
|
||||
await clickVisibleButton(browser, ".action-buttons button.primary");
|
||||
await clickVisibleButton(browser, ".action-buttons button.secondary");
|
||||
|
||||
await test_upgrade_screen_content(
|
||||
browser,
|
||||
|
@ -180,7 +180,7 @@ add_task(
|
|||
["main.PIN_FIREFOX"]
|
||||
);
|
||||
|
||||
await clickVisibleButton(browser, ".action-buttons button.primary");
|
||||
await clickVisibleButton(browser, ".action-buttons button.secondary");
|
||||
|
||||
await test_upgrade_screen_content(
|
||||
browser,
|
||||
|
@ -226,7 +226,7 @@ add_task(
|
|||
["main.PIN_FIREFOX"]
|
||||
);
|
||||
|
||||
await clickVisibleButton(browser, ".action-buttons button.primary");
|
||||
await clickVisibleButton(browser, ".action-buttons button.secondary");
|
||||
|
||||
await test_upgrade_screen_content(
|
||||
browser,
|
||||
|
@ -304,7 +304,7 @@ add_task(async function test_aboutwelcome_upgrade_mr_private_pin_get_started() {
|
|||
["input#action-checkbox"]
|
||||
);
|
||||
|
||||
await clickVisibleButton(browser, ".action-buttons button.primary");
|
||||
await clickVisibleButton(browser, ".action-buttons button.secondary");
|
||||
|
||||
await waitForDialogClose(browser);
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
|
@ -352,7 +352,7 @@ add_task(
|
|||
["input#action-checkbox"]
|
||||
);
|
||||
|
||||
await clickVisibleButton(browser, ".action-buttons button.primary");
|
||||
await clickVisibleButton(browser, ".action-buttons button.secondary");
|
||||
await waitForDialogClose(browser);
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ export class FakensIPrefBranch {
|
|||
FakensIPrefBranch.prototype.prefs = {};
|
||||
|
||||
/**
|
||||
* Very simple fake for the most basic semantics of Preferences.jsm.
|
||||
* Very simple fake for the most basic semantics of Preferences.sys.mjs.
|
||||
* Extends FakensIPrefBranch.
|
||||
*/
|
||||
export class FakePrefs extends FakensIPrefBranch {
|
||||
|
@ -136,7 +136,7 @@ export class FakePrefs extends FakensIPrefBranch {
|
|||
}
|
||||
|
||||
/**
|
||||
* Slimmed down version of toolkit/modules/EventEmitter.jsm
|
||||
* Slimmed down version of toolkit/modules/EventEmitter.sys.mjs
|
||||
*/
|
||||
export function EventEmitter() {}
|
||||
EventEmitter.decorate = function(objectToDecorate) {
|
||||
|
|
|
@ -5,20 +5,5 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
extends: ["plugin:mozilla/valid-jsdoc"],
|
||||
|
||||
rules: {
|
||||
"require-jsdoc": [
|
||||
"error",
|
||||
{
|
||||
require: {
|
||||
FunctionDeclaration: false,
|
||||
MethodDefinition: false,
|
||||
ClassDeclaration: true,
|
||||
ArrowFunctionExpression: false,
|
||||
FunctionExpression: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
extends: ["plugin:mozilla/require-jsdoc", "plugin:mozilla/valid-jsdoc"],
|
||||
};
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.importESModule(
|
||||
"resource://gre/modules/XPCOMUtils.sys.mjs"
|
||||
);
|
||||
import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";
|
||||
|
||||
const lazy = {};
|
||||
|
||||
|
|
|
@ -84,6 +84,7 @@ export const DomainGroupBuilder = new (class DomainGroupBuilder {
|
|||
* Updates the domain snapshot groups based on the added and removed urls.
|
||||
*
|
||||
* @param {object} options
|
||||
* The options for the update.
|
||||
* @param {Set<object>} options.addedItems
|
||||
* The added items (url, userPersisted) to handle in this update.
|
||||
* @param {Set<string>} options.removedUrls
|
||||
|
@ -206,6 +207,7 @@ export const DomainGroupBuilder = new (class DomainGroupBuilder {
|
|||
* Gets the domain of a URL.
|
||||
*
|
||||
* @param {string} url
|
||||
* The url to get the domain of
|
||||
* @returns {string}
|
||||
*/
|
||||
#getDomain(url) {
|
||||
|
|
|
@ -156,8 +156,10 @@ class _Interactions {
|
|||
_pageViewStartTime = Cu.now();
|
||||
|
||||
/**
|
||||
* Stores interactions in the database, see the InteractionsStore class.
|
||||
* This is created lazily, see the `store` getter.
|
||||
* Stores interactions in the database, see the {@link InteractionsStore}
|
||||
* class. This is created lazily, see the `store` getter.
|
||||
*
|
||||
* @type {InteractionsStore | undefined}
|
||||
*/
|
||||
#store = undefined;
|
||||
|
||||
|
@ -230,6 +232,8 @@ class _Interactions {
|
|||
* Retrieve the underlying InteractionsStore object. This exists for testing
|
||||
* purposes and should not be abused by production code (for example it'd be
|
||||
* a bad idea to force flushes).
|
||||
*
|
||||
* @returns {InteractionsStore}
|
||||
*/
|
||||
get store() {
|
||||
if (!this.#store) {
|
||||
|
@ -336,6 +340,8 @@ class _Interactions {
|
|||
|
||||
/**
|
||||
* Returns the interactions update promise to be used when sychronization is needed from tests.
|
||||
*
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
get interactionUpdatePromise() {
|
||||
return _Interactions.interactionUpdatePromise;
|
||||
|
@ -344,12 +350,18 @@ class _Interactions {
|
|||
/**
|
||||
* Updates the current interaction on fulfillment of the asynchronous collection of scrolling interactions.
|
||||
*
|
||||
* @param {Browser} browser
|
||||
* @param {DOMWindow} activeWindow
|
||||
* @param {boolean} userIsIdle
|
||||
* @param {WeakMap<browser, InteractionInfo>} interactions
|
||||
* @param {number} pageViewStartTime
|
||||
* @param {InteractionsStore} store
|
||||
* @param {Browser} browser
|
||||
* The browser object that has triggered the update, if known.
|
||||
* @param {DOMWindow} activeWindow
|
||||
* The active window.
|
||||
* @param {boolean} userIsIdle
|
||||
* Whether the user is idle.
|
||||
* @param {WeakMap<Browser, InteractionInfo>} interactions
|
||||
* A map of interactions for each browser instance
|
||||
* @param {number} pageViewStartTime
|
||||
* The time the page was loaded.
|
||||
* @param {InteractionsStore} store
|
||||
* The interactions store.
|
||||
*/
|
||||
static async #updateInteraction_async(
|
||||
browser,
|
||||
|
@ -419,6 +431,7 @@ class _Interactions {
|
|||
* Handles a window becoming active.
|
||||
*
|
||||
* @param {DOMWindow} win
|
||||
* The window that has become active.
|
||||
*/
|
||||
#onActivateWindow(win) {
|
||||
lazy.logConsole.debug("Window activated");
|
||||
|
@ -435,6 +448,7 @@ class _Interactions {
|
|||
* Handles a window going inactive.
|
||||
*
|
||||
* @param {DOMWindow} win
|
||||
* The window that is going inactive.
|
||||
*/
|
||||
#onDeactivateWindow(win) {
|
||||
lazy.logConsole.debug("Window deactivate");
|
||||
|
@ -462,6 +476,7 @@ class _Interactions {
|
|||
* Handles various events and forwards them to appropriate functions.
|
||||
*
|
||||
* @param {DOMEvent} event
|
||||
* The event that will be handled
|
||||
*/
|
||||
handleEvent(event) {
|
||||
switch (event.type) {
|
||||
|
@ -484,8 +499,11 @@ class _Interactions {
|
|||
* Handles notifications from the observer service.
|
||||
*
|
||||
* @param {nsISupports} subject
|
||||
* The subject of the notification.
|
||||
* @param {string} topic
|
||||
* The topic of the notification.
|
||||
* @param {string} data
|
||||
* The data attached to the notification.
|
||||
*/
|
||||
observe(subject, topic, data) {
|
||||
switch (topic) {
|
||||
|
@ -713,8 +731,11 @@ class InteractionsStore {
|
|||
* Handles notifications from the observer service.
|
||||
*
|
||||
* @param {nsISupports} subject
|
||||
* The subject of the notification.
|
||||
* @param {string} topic
|
||||
* The topic of the notification.
|
||||
* @param {string} data
|
||||
* The data attached to the notification.
|
||||
*/
|
||||
observe(subject, topic, data) {
|
||||
switch (topic) {
|
||||
|
|
|
@ -134,9 +134,7 @@ export class InteractionsChild extends JSWindowActorChild {
|
|||
/**
|
||||
* Returns the current document information for sending to the parent process.
|
||||
*
|
||||
* @returns {object|null} [docInfo]
|
||||
* @returns {string} docInfo.url
|
||||
* The url of the document.
|
||||
* @returns {{ isActive: boolean, url: string, referrer: * }?}
|
||||
*/
|
||||
#getDocumentInfo() {
|
||||
let doc = this.document;
|
||||
|
|
|
@ -59,6 +59,7 @@ export const PinnedGroupBuilder = new (class PinnedGroupBuilder {
|
|||
* Updates the group based on the added and removed urls.
|
||||
*
|
||||
* @param {object} options
|
||||
* The options object.
|
||||
* @param {Set<object>} options.addedItems
|
||||
* The added items to handle in this update. A set of objects with
|
||||
* properties of url and userPersisted.
|
||||
|
|
|
@ -48,10 +48,15 @@ let InternalFaviconLoader = {
|
|||
* Actually cancel the request, and clear the timeout for cancelling it.
|
||||
*
|
||||
* @param {object} options
|
||||
* @param {string} options.uri
|
||||
* The options object containing:
|
||||
* @param {object} options.uri
|
||||
* The URI of the favicon to cancel.
|
||||
* @param {number} options.innerWindowID
|
||||
* The inner window ID of the window. Unused.
|
||||
* @param {number} options.timerID
|
||||
* The timer ID of the timeout to be cancelled
|
||||
* @param {*} options.callback
|
||||
* The request callback
|
||||
* @param {string} reason
|
||||
* The reason for cancelling the request.
|
||||
*/
|
||||
|
@ -122,12 +127,15 @@ let InternalFaviconLoader = {
|
|||
* load data per chrome window.
|
||||
*
|
||||
* @param {DOMWindow} win
|
||||
* the chrome window in which we should look for this load
|
||||
* @param {object} filterData ({innerWindowID, uri, callback})
|
||||
* the data we should use to find this particular load to remove.
|
||||
* the chrome window in which we should look for this load
|
||||
* @param {object} filterData
|
||||
* the data we should use to find this particular load to remove.
|
||||
* @param {number} filterData.innerWindowID
|
||||
* The inner window ID of the window.
|
||||
* @param {string} filterData.uri
|
||||
* @param {Function} filterData.callback
|
||||
* The URI of the favicon to cancel.
|
||||
* @param {*} filterData.callback
|
||||
* The request callback
|
||||
*
|
||||
* @returns {object|null}
|
||||
* the loadData object we removed, or null if we didn't find any.
|
||||
|
@ -159,7 +167,9 @@ let InternalFaviconLoader = {
|
|||
* away) but that will be a no-op in such cases.
|
||||
*
|
||||
* @param {DOMWindow} win
|
||||
* The chrome window in which the request was made.
|
||||
* @param {number} id
|
||||
* The inner window ID of the window.
|
||||
* @returns {object}
|
||||
*/
|
||||
_makeCompletionCallback(win, id) {
|
||||
|
@ -287,6 +297,7 @@ class BookmarkState {
|
|||
* Save edited title for the bookmark
|
||||
*
|
||||
* @param {string} title
|
||||
* The title of the bookmark
|
||||
*/
|
||||
_titleChanged(title) {
|
||||
this._newState.title = title;
|
||||
|
@ -296,6 +307,7 @@ class BookmarkState {
|
|||
* Save edited location for the bookmark
|
||||
*
|
||||
* @param {string} location
|
||||
* The location of the bookmark
|
||||
*/
|
||||
_locationChanged(location) {
|
||||
this._newState.uri = location;
|
||||
|
@ -315,6 +327,7 @@ class BookmarkState {
|
|||
* Save edited keyword for the bookmark
|
||||
*
|
||||
* @param {string} keyword
|
||||
* The keyword of the bookmark
|
||||
*/
|
||||
_keywordChanged(keyword) {
|
||||
this._newState.keyword = keyword;
|
||||
|
@ -324,6 +337,7 @@ class BookmarkState {
|
|||
* Save edited parentGuid for the bookmark
|
||||
*
|
||||
* @param {string} parentGuid
|
||||
* The parentGuid of the bookmark
|
||||
*/
|
||||
_parentGuidChanged(parentGuid) {
|
||||
this._newState.parentGuid = parentGuid;
|
||||
|
|
|
@ -287,6 +287,7 @@ export const SnapshotGroups = new (class SnapshotGroups {
|
|||
* Queries the list of SnapshotGroups.
|
||||
*
|
||||
* @param {object} [options]
|
||||
* Options for the query.
|
||||
* @param {number} [options.limit]
|
||||
* A numerical limit to the number of snapshots to retrieve, defaults to 50.
|
||||
* Use -1 to specify no limit.
|
||||
|
@ -385,7 +386,7 @@ export const SnapshotGroups = new (class SnapshotGroups {
|
|||
* Obtains the snapshot urls for a particular group. This is designed for
|
||||
* builders to easily grab the list of urls in a group.
|
||||
*
|
||||
* @param {object} options
|
||||
* @param {object} options Options for the query.
|
||||
* @param {number} options.id
|
||||
* The id of the snapshot group to get the snapshots for.
|
||||
* @param {boolean} [options.hidden]
|
||||
|
@ -422,6 +423,7 @@ export const SnapshotGroups = new (class SnapshotGroups {
|
|||
* snapshots across to the content process at one time.
|
||||
*
|
||||
* @param {object} options
|
||||
* Options for the query.
|
||||
* @param {number} options.id
|
||||
* The id of the snapshot group to get the snapshots for.
|
||||
* @param {number} [options.startIndex]
|
||||
|
|
|
@ -156,6 +156,13 @@ export const SnapshotMonitor = new (class SnapshotMonitor {
|
|||
/**
|
||||
* Test-only function used to override the delay values to provide shorter
|
||||
* delays for tests.
|
||||
*
|
||||
* @param {object} [options]
|
||||
* The object containing the delay values.
|
||||
* @param {number} [options.added]
|
||||
* The delay for added snapshots.
|
||||
* @param {number} [options.removed]
|
||||
* The delay for removed snapshots.
|
||||
*/
|
||||
setTimerDelaysForTests({
|
||||
added = lazy.SNAPSHOT_ADDED_TIMER_DELAY,
|
||||
|
@ -305,8 +312,11 @@ export const SnapshotMonitor = new (class SnapshotMonitor {
|
|||
* tests and know that the triggerBuilders for idle-daily has finished.
|
||||
*
|
||||
* @param {object} subject
|
||||
* Notification specific interface pointer
|
||||
* @param {string} topic
|
||||
* @param {nsISupports} data
|
||||
* The topic of the notification
|
||||
* @param {string} data
|
||||
* The data attached to the notification
|
||||
*/
|
||||
async observe(subject, topic, data) {
|
||||
switch (topic) {
|
||||
|
|
|
@ -297,6 +297,7 @@ export const SnapshotScorer = new (class SnapshotScorer {
|
|||
* Calculates points based on how many times the snapshot has been visited.
|
||||
*
|
||||
* @param {Snapshot} snapshot
|
||||
* The snapshot used for calculation
|
||||
* @returns {number}
|
||||
*/
|
||||
_scoreVisit(snapshot) {
|
||||
|
@ -312,7 +313,9 @@ export const SnapshotScorer = new (class SnapshotScorer {
|
|||
* the current session.
|
||||
*
|
||||
* @param {Snapshot} snapshot
|
||||
* The snapshot used for calculation
|
||||
* @param {Set} currentSessionUrls
|
||||
* The urls of the current session
|
||||
* @returns {number}
|
||||
*/
|
||||
_scoreCurrentSession(snapshot, currentSessionUrls) {
|
||||
|
@ -323,6 +326,7 @@ export const SnapshotScorer = new (class SnapshotScorer {
|
|||
* Calculates points based on if the user persisted the snapshot.
|
||||
*
|
||||
* @param {Snapshot} snapshot
|
||||
* The snapshot used for calculation
|
||||
* @returns {number}
|
||||
*/
|
||||
_scoreIsUserPersisted(snapshot) {
|
||||
|
@ -333,6 +337,7 @@ export const SnapshotScorer = new (class SnapshotScorer {
|
|||
* Calculates points based on if the user removed the snapshot.
|
||||
*
|
||||
* @param {Snapshot} snapshot
|
||||
* The snapshot used for calculation
|
||||
* @returns {number}
|
||||
*/
|
||||
_scoreIsUserRemoved(snapshot) {
|
||||
|
|
|
@ -114,6 +114,7 @@ export class SnapshotSelector extends EventEmitter {
|
|||
|
||||
/**
|
||||
* @param {object} options
|
||||
* Options for the selector.
|
||||
* @param {number} [options.count]
|
||||
* The maximum number of snapshots we ever need to generate. This should not
|
||||
* affect the actual snapshots generated and their order but may speed up
|
||||
|
@ -185,6 +186,7 @@ export class SnapshotSelector extends EventEmitter {
|
|||
* Called internally when the set of snapshots has been generated.
|
||||
*
|
||||
* @param {Recommendation[]} recommendations
|
||||
* The generated recommendations.
|
||||
*/
|
||||
#snapshotsGenerated(recommendations) {
|
||||
// If this instance has been destroyed then do nothing.
|
||||
|
@ -310,6 +312,7 @@ export class SnapshotSelector extends EventEmitter {
|
|||
* Undefined properties are ignored, thus pass null to nullify a property.
|
||||
*
|
||||
* @param {object} context
|
||||
* The new context.
|
||||
* @param {string} [context.url]
|
||||
* The url of the current context.
|
||||
* @param {number} [context.time]
|
||||
|
|
|
@ -236,7 +236,8 @@ export const Snapshots = new (class Snapshots {
|
|||
* This is called by PageThumbs to see what thumbnails should be kept alive.
|
||||
* Currently, the last 100 snapshots are kept alive.
|
||||
*
|
||||
* @param {Function} callback
|
||||
* @param {function(string[])} callback
|
||||
* Called with an array of urls to keep alive.
|
||||
*/
|
||||
async filterForThumbnailExpiration(callback) {
|
||||
let snapshots = await this.query();
|
||||
|
@ -385,6 +386,7 @@ export const Snapshots = new (class Snapshots {
|
|||
* cleared.
|
||||
*
|
||||
* @param {object} details
|
||||
* The details of the snapshot to add.
|
||||
* @param {string} details.url
|
||||
* The url associated with the snapshot.
|
||||
* @param {string} [details.title]
|
||||
|
@ -589,6 +591,7 @@ export const Snapshots = new (class Snapshots {
|
|||
* Queries the current snapshots in the database.
|
||||
*
|
||||
* @param {object} [options]
|
||||
* Options for the query.
|
||||
* @param {number} [options.limit]
|
||||
* A numerical limit to the number of snapshots to retrieve, defaults to 100.
|
||||
* -1 may be used to get all snapshots, e.g. for use by the group builders.
|
||||
|
@ -615,7 +618,7 @@ export const Snapshots = new (class Snapshots {
|
|||
* @param {string} [options.sortBy]
|
||||
* A string to choose what to sort the snapshots by, e.g. "last_interaction_at"
|
||||
* By default results are sorted by last_interaction_at.
|
||||
* @returns {Snapshot[]}
|
||||
* @returns {Promise<Snapshot[]>}
|
||||
* Returns snapshots in order of descending last interaction time.
|
||||
*/
|
||||
async query({
|
||||
|
@ -1036,6 +1039,7 @@ export const Snapshots = new (class Snapshots {
|
|||
* 2) thumbnail of the page
|
||||
*
|
||||
* @param {Snapshot} snapshot
|
||||
* The snapshot to get the image for.
|
||||
*
|
||||
* @returns {string?}
|
||||
*/
|
||||
|
|
|
@ -667,6 +667,7 @@ PlacesViewBase.prototype = {
|
|||
* This method may be overridden by classes that extend this base class.
|
||||
*
|
||||
* @param {Element} elt
|
||||
* The element to check.
|
||||
* @returns {boolean}
|
||||
*/
|
||||
_isPopupOpen(elt) {
|
||||
|
|
|
@ -238,6 +238,7 @@ var gEditItemOverlay = {
|
|||
* Initialize the panel.
|
||||
*
|
||||
* @param {object} aInfo
|
||||
* The initialization info.
|
||||
* @param {object} [aInfo.node]
|
||||
* If aInfo.uris is not specified, this must be specified.
|
||||
* Either a result node or a node-like object representing the item to be edited.
|
||||
|
|
|
@ -229,6 +229,7 @@ var gEditItemOverlay = {
|
|||
* Initialize the panel.
|
||||
*
|
||||
* @param {object} aInfo
|
||||
* The initialization info.
|
||||
* @param {object} [aInfo.node]
|
||||
* If aInfo.uris is not specified, this must be specified.
|
||||
* Either a result node or a node-like object representing the item to be edited.
|
||||
|
|
|
@ -214,6 +214,9 @@
|
|||
|
||||
/**
|
||||
* This is the view that manages the popup.
|
||||
*
|
||||
* @see {@link PlacesUIUtils.getViewForNode}
|
||||
* @returns {DOMNode}
|
||||
*/
|
||||
get _rootView() {
|
||||
if (!this.__rootView) {
|
||||
|
|
|
@ -165,7 +165,8 @@
|
|||
/**
|
||||
* overriding
|
||||
*
|
||||
* @param {object} val
|
||||
* @param {PlacesTreeView} val
|
||||
* The parent view
|
||||
*/
|
||||
set view(val) {
|
||||
// We save the view so that we can avoid expensive get calls when
|
||||
|
@ -475,6 +476,7 @@
|
|||
* will be opened, so that the node is visible.
|
||||
*
|
||||
* @param {string} placeURI
|
||||
* The URI that should be selected
|
||||
*/
|
||||
selectPlaceURI(placeURI) {
|
||||
// Do nothing if a node matching the given uri is already selected
|
||||
|
@ -543,6 +545,7 @@
|
|||
* node is visible.
|
||||
*
|
||||
* @param {object} node
|
||||
* The node that should be selected
|
||||
*/
|
||||
selectNode(node) {
|
||||
var view = this.view;
|
||||
|
@ -717,6 +720,7 @@
|
|||
* in its subtree.
|
||||
*
|
||||
* @param {object} node
|
||||
* The node to search.
|
||||
* @returns {boolean}
|
||||
* Returns true if at least one item was found.
|
||||
*/
|
||||
|
|
|
@ -595,7 +595,7 @@ var PlacesOrganizer = {
|
|||
/**
|
||||
* Called when a menuitem is selected from the restore menu.
|
||||
*
|
||||
* @param {object} aMenuItem
|
||||
* @param {object} aMenuItem The menuitem that was selected.
|
||||
*/
|
||||
async onRestoreMenuItemClick(aMenuItem) {
|
||||
let backupName = aMenuItem.getAttribute("value");
|
||||
|
@ -819,6 +819,9 @@ var PlacesOrganizer = {
|
|||
var PlacesSearchBox = {
|
||||
/**
|
||||
* The Search text field
|
||||
*
|
||||
* @see {@link https://searchfox.org/mozilla-central/source/toolkit/content/widgets/search-textbox.js}
|
||||
* @returns {HTMLInputElement}
|
||||
*/
|
||||
get searchFilter() {
|
||||
return document.getElementById("searchFilter");
|
||||
|
@ -940,6 +943,8 @@ var PlacesSearchBox = {
|
|||
|
||||
/**
|
||||
* Gets/sets the active collection from the dropdown menu.
|
||||
*
|
||||
* @returns {string}
|
||||
*/
|
||||
get filterCollection() {
|
||||
return this.searchFilter.getAttribute("collection");
|
||||
|
@ -969,6 +974,8 @@ var PlacesSearchBox = {
|
|||
|
||||
/**
|
||||
* Gets or sets the text shown in the Places Search Box
|
||||
*
|
||||
* @returns {string}
|
||||
*/
|
||||
get value() {
|
||||
return this.searchFilter.value;
|
||||
|
@ -1164,6 +1171,7 @@ var ViewMenu = {
|
|||
* Set up the content of the view menu.
|
||||
*
|
||||
* @param {object} event
|
||||
* The event that invoked this function
|
||||
*/
|
||||
populateSortMenu: function VM_populateSortMenu(event) {
|
||||
this.fillWithColumns(
|
||||
|
@ -1427,7 +1435,8 @@ var ContentArea = {
|
|||
/**
|
||||
* Options for the current view.
|
||||
*
|
||||
* @see ContentTree.viewOptions for supported options and default values.
|
||||
* @see {@link ContentTree.viewOptions} for supported options and default values.
|
||||
* @returns {{showDetailsPane: boolean;toolbarSet: string;}}
|
||||
*/
|
||||
get currentViewOptions() {
|
||||
// Use ContentTree options as default.
|
||||
|
|
|
@ -85,7 +85,13 @@
|
|||
data-l10n-args='{"count":"1"}'
|
||||
command="placesCmd_delete"
|
||||
closemenu="single"
|
||||
node-type="link_bookmark"/>
|
||||
node-type="link_bookmark"
|
||||
hide-if-node-type="link_bookmark_tag"/>
|
||||
<menuitem id="placesContext_removeTag"
|
||||
data-l10n-id="places-untag-bookmark"
|
||||
command="placesCmd_delete"
|
||||
closemenu="single"
|
||||
node-type="link_bookmark_tag"/>
|
||||
<menuitem id="placesContext_deleteFolder"
|
||||
data-l10n-id="places-delete-folder"
|
||||
data-l10n-args='{"count":"1"}'
|
||||
|
|
|
@ -147,7 +147,7 @@ PlacesTreeView.prototype = {
|
|||
* node which isn't supposed to be in the tree (e.g. separators in
|
||||
* sorted trees).
|
||||
* @param {boolean} [aForceBuild]
|
||||
* @see _isPlainContainer.
|
||||
* See {@link _isPlainContainer}.
|
||||
* If true, the row will be computed even if the node still isn't set
|
||||
* in our rows array.
|
||||
* @param {object} [aParentRow]
|
||||
|
@ -254,6 +254,7 @@ PlacesTreeView.prototype = {
|
|||
* Gets the node at a given row.
|
||||
*
|
||||
* @param {number} aRow
|
||||
* The index of the row to set
|
||||
* @returns {object}
|
||||
*/
|
||||
_getNodeForRow: function PTV__getNodeForRow(aRow) {
|
||||
|
@ -399,6 +400,7 @@ PlacesTreeView.prototype = {
|
|||
* will count the node itself plus any child node following it.
|
||||
*
|
||||
* @param {number} aNodeRow
|
||||
* The row of the node to count
|
||||
* @returns {number}
|
||||
*/
|
||||
_countVisibleRowsForNodeAtRow: function PTV__countVisibleRowsForNodeAtRow(
|
||||
|
@ -766,8 +768,11 @@ PlacesTreeView.prototype = {
|
|||
* change for visits, and date sorting is the only time things are collapsed.
|
||||
*
|
||||
* @param {object} aParentNode
|
||||
* The parent node of the node being removed.
|
||||
* @param {object} aNode
|
||||
* The node to remove from the tree.
|
||||
* @param {number} aOldIndex
|
||||
* The old index of the node in the parent.
|
||||
*/
|
||||
nodeRemoved: function PTV_nodeRemoved(aParentNode, aNode, aOldIndex) {
|
||||
console.assert(this._result, "Got a notification but have no result!");
|
||||
|
|
|
@ -430,26 +430,7 @@ const placesStatsHandler = new (class extends TableViewer {
|
|||
* Loads the current metadata from the database and updates the display.
|
||||
*/
|
||||
async updateDisplay() {
|
||||
let stats = await PlacesDBUtils.getEntitiesStats();
|
||||
let data = [];
|
||||
let db = await PlacesUtils.promiseDBConnection();
|
||||
for (let [entity, value] of stats) {
|
||||
let count = "-";
|
||||
try {
|
||||
if (
|
||||
entity.startsWith("moz_") &&
|
||||
!entity.endsWith("index") &&
|
||||
entity != "moz_places_visitcount" /* bug in index name */
|
||||
) {
|
||||
count = (
|
||||
await db.execute(`SELECT count(*) FROM ${entity}`)
|
||||
)[0].getResultByIndex(0);
|
||||
}
|
||||
} catch (ex) {
|
||||
console.error(ex);
|
||||
}
|
||||
data.push(Object.assign(value, { entity, count }));
|
||||
}
|
||||
let data = await PlacesDBUtils.getEntitiesStatsAndCounts();
|
||||
this.displayData(data);
|
||||
}
|
||||
})();
|
||||
|
|
|
@ -34,6 +34,15 @@ add_setup(async function() {
|
|||
|
||||
/**
|
||||
* Helper to check we've shown the toolbar
|
||||
*
|
||||
* @param {object} options
|
||||
* Options for the test
|
||||
* @param {boolean} options.showToolbar
|
||||
* If the toolbar should be shown or not
|
||||
* @param {string} options.expectedFolder
|
||||
* The expected folder to be shown
|
||||
* @param {string} options.reason
|
||||
* The reason the toolbar should be shown
|
||||
*/
|
||||
async function checkResponse({ showToolbar, expectedFolder, reason }) {
|
||||
// Check folder.
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
const TEST_URL = "about:buildconfig";
|
||||
const TEST_URI = Services.io.newURI(TEST_URL);
|
||||
const TEST_TAG = "tag";
|
||||
|
||||
// Setup.
|
||||
add_setup(async function() {
|
||||
|
@ -207,3 +208,59 @@ add_task(async function test_remove_tags_from_Sidebar() {
|
|||
);
|
||||
});
|
||||
});
|
||||
|
||||
add_task(async function test_remove_tags_from_Library() {
|
||||
await PlacesUtils.bookmarks.insert({
|
||||
parentGuid: PlacesUtils.bookmarks.unfiledGuid,
|
||||
url: TEST_URL,
|
||||
title: TEST_URL,
|
||||
});
|
||||
PlacesUtils.tagging.tagURI(TEST_URI, [TEST_TAG]);
|
||||
const getTags = () => PlacesUtils.tagging.getTagsForURI(TEST_URI);
|
||||
|
||||
// Open the Library and select the tag.
|
||||
const library = await promiseLibrary("place:tag=" + TEST_TAG);
|
||||
|
||||
registerCleanupFunction(async function() {
|
||||
await promiseLibraryClosed(library);
|
||||
});
|
||||
|
||||
const contextMenu = library.document.getElementById("placesContext");
|
||||
const contextMenuDeleteTag = library.document.getElementById(
|
||||
"placesContext_removeTag"
|
||||
);
|
||||
|
||||
let firstColumn = library.ContentTree.view.columns[0];
|
||||
let firstBookmarkRect = library.ContentTree.view.getCoordsForCellItem(
|
||||
0,
|
||||
firstColumn,
|
||||
"bm0"
|
||||
);
|
||||
|
||||
EventUtils.synthesizeMouse(
|
||||
library.ContentTree.view.body,
|
||||
firstBookmarkRect.x,
|
||||
firstBookmarkRect.y,
|
||||
{ type: "contextmenu", button: 2 },
|
||||
library
|
||||
);
|
||||
|
||||
await BrowserTestUtils.waitForEvent(contextMenu, "popupshown");
|
||||
|
||||
ok(getTags().includes(TEST_TAG), "Test tag exists before delete.");
|
||||
|
||||
contextMenu.activateItem(contextMenuDeleteTag, {});
|
||||
|
||||
await PlacesTestUtils.waitForNotification(
|
||||
"bookmark-tags-changed",
|
||||
() => true,
|
||||
"places"
|
||||
);
|
||||
await promiseLibraryClosed(library);
|
||||
|
||||
ok(
|
||||
await PlacesUtils.bookmarks.fetch({ url: TEST_URL }),
|
||||
"Bookmark still exists after removing tag."
|
||||
);
|
||||
ok(!getTags().includes(TEST_TAG), "Test tag is removed after delete.");
|
||||
});
|
||||
|
|
|
@ -525,6 +525,7 @@ async function closeToolbarContextMenu() {
|
|||
* Other Bookmarks folder testable.
|
||||
*
|
||||
* @param {object} [win]
|
||||
* The window object to use.
|
||||
*/
|
||||
async function setupBookmarksToolbar(win = window) {
|
||||
let toolbar = win.document.getElementById("PersonalToolbar");
|
||||
|
|
|
@ -14,6 +14,7 @@ var wasCollapsed = toolbar.collapsed;
|
|||
* We cannot just use menu.open, since it would not work on Mac due to native menubar.
|
||||
*
|
||||
* @param {object} aPopup
|
||||
* The popup element
|
||||
*/
|
||||
function fakeOpenPopup(aPopup) {
|
||||
var popupEvent = document.createEvent("MouseEvent");
|
||||
|
|
|
@ -36,6 +36,7 @@ const TOPIC_DELETED = "places-snapshots-deleted";
|
|||
* Adds a test interaction to the database.
|
||||
*
|
||||
* @param {InteractionInfo[]} interactions
|
||||
* The array of interactions to add
|
||||
*/
|
||||
async function addInteractions(interactions) {
|
||||
await PlacesTestUtils.addVisits(interactions);
|
||||
|
@ -94,8 +95,11 @@ async function getInteractions() {
|
|||
* the given list of urls.
|
||||
*
|
||||
* @param {string} topic
|
||||
* The notifications topic. One of TOPIC_ADDED or TOPIC_DELETED.
|
||||
* @param {string[]} expected
|
||||
* A list of URLs to have expected the call from
|
||||
* @param {Function} task
|
||||
* The task that will trigger the notification
|
||||
*/
|
||||
async function assertUrlNotification(topic, expected, task) {
|
||||
let seen = false;
|
||||
|
@ -130,7 +134,9 @@ async function assertUrlNotification(topic, expected, task) {
|
|||
* not sent.
|
||||
*
|
||||
* @param {string} topic
|
||||
* The notifications topic. One of TOPIC_ADDED or TOPIC_DELETED.
|
||||
* @param {Function} task
|
||||
* The task that will trigger the notification
|
||||
*/
|
||||
async function assertTopicNotObserved(topic, task) {
|
||||
let seen = false;
|
||||
|
@ -298,7 +304,7 @@ async function assertSnapshotList(received, expected) {
|
|||
* @param {Snapshot[]} expected
|
||||
* The expected snapshots.
|
||||
* @param {object} options
|
||||
* @see Snapshots.query().
|
||||
* See the options for {@link Snapshots.query}
|
||||
*/
|
||||
async function assertSnapshots(expected, options) {
|
||||
let snapshots = await Snapshots.query(options);
|
||||
|
@ -367,7 +373,7 @@ function orderedGroups(list, order) {
|
|||
* @param {Snapshot[]} expected
|
||||
* The expected snapshots.
|
||||
* @param {SelectionContext} context
|
||||
* @see SnapshotSelector.#context.
|
||||
* See the documentation for {@link SnapshotSelector.#context}
|
||||
*/
|
||||
async function assertOverlappingSnapshots(expected, context) {
|
||||
let recommendations = await Snapshots.recommendationSources.Overlapping(
|
||||
|
@ -383,7 +389,7 @@ async function assertOverlappingSnapshots(expected, context) {
|
|||
* @param {Snapshot[]} expected
|
||||
* The expected snapshots.
|
||||
* @param {SelectionContext} context
|
||||
* @see SnapshotSelector.#context.
|
||||
* See the documentation for {@link SnapshotSelector.#context}
|
||||
*/
|
||||
async function assertCommonReferrerSnapshots(expected, context) {
|
||||
let recommendations = await Snapshots.recommendationSources.CommonReferrer(
|
||||
|
@ -399,7 +405,7 @@ async function assertCommonReferrerSnapshots(expected, context) {
|
|||
* @param {Snapshot[]} expected
|
||||
* The expected snapshots.
|
||||
* @param {SelectionContext} context
|
||||
* @see SnapshotSelector.#context.
|
||||
* See the documentation for {@link SnapshotSelector.#context}
|
||||
*/
|
||||
async function assertTimeOfDaySnapshots(expected, context) {
|
||||
let recommendations = await Snapshots.recommendationSources.TimeOfDay(
|
||||
|
|
|
@ -23,6 +23,7 @@ async function reset_interactions_snapshots() {
|
|||
* Creates an interaction and snapshot for a given url
|
||||
*
|
||||
* @param {object} [options]
|
||||
* The options property containing the following:
|
||||
* @param {string} [options.url]
|
||||
* The url
|
||||
* @param {string} [options.referrer]
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue