summaryrefslogtreecommitdiffstats
path: root/browser/components/resistfingerprinting
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:42 +0000
commitda4c7e7ed675c3bf405668739c3012d140856109 (patch)
treecdd868dba063fecba609a1d819de271f0d51b23e /browser/components/resistfingerprinting
parentAdding upstream version 125.0.3. (diff)
downloadfirefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz
firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/resistfingerprinting')
-rw-r--r--browser/components/resistfingerprinting/test/browser/browser_dynamical_window_rounding.js2
-rw-r--r--browser/components/resistfingerprinting/test/browser/browser_navigator.js2
-rw-r--r--browser/components/resistfingerprinting/test/browser/browser_spoofing_keyboard_event.js2
-rw-r--r--browser/components/resistfingerprinting/test/browser/browser_timezone.js9
-rw-r--r--browser/components/resistfingerprinting/test/browser/file_animationapi_iframee.html2
-rw-r--r--browser/components/resistfingerprinting/test/browser/file_animationapi_iframer.html2
-rw-r--r--browser/components/resistfingerprinting/test/browser/file_hwconcurrency_aboutblank_popupmaker.html2
-rw-r--r--browser/components/resistfingerprinting/test/browser/file_hwconcurrency_blob_popupmaker.html2
-rw-r--r--browser/components/resistfingerprinting/test/browser/file_hwconcurrency_blobcrossorigin_iframer.html2
-rw-r--r--browser/components/resistfingerprinting/test/browser/file_hwconcurrency_data_popupmaker.html2
-rw-r--r--browser/components/resistfingerprinting/test/browser/file_hwconcurrency_iframer.html2
-rw-r--r--browser/components/resistfingerprinting/test/browser/file_hwconcurrency_sandboxediframe_double_framee.html2
-rw-r--r--browser/components/resistfingerprinting/test/browser/file_navigator_iframee.html2
-rw-r--r--browser/components/resistfingerprinting/test/browser/file_reduceTimePrecision_iframer.html2
-rw-r--r--browser/components/resistfingerprinting/test/browser/head.js6
-rw-r--r--browser/components/resistfingerprinting/test/mochitest/test_geolocation.html4
16 files changed, 26 insertions, 19 deletions
diff --git a/browser/components/resistfingerprinting/test/browser/browser_dynamical_window_rounding.js b/browser/components/resistfingerprinting/test/browser/browser_dynamical_window_rounding.js
index 13dcec8ea1..69443db930 100644
--- a/browser/components/resistfingerprinting/test/browser/browser_dynamical_window_rounding.js
+++ b/browser/components/resistfingerprinting/test/browser/browser_dynamical_window_rounding.js
@@ -160,7 +160,7 @@ async function test_dynamical_window_rounding(aWindow, aCheckFunc) {
* check() functions use ok() while on Linux, we do not all ok() and instead
* rely on waitForCondition to fail).
*
- * The logging statements in this test, and RFPHelper.jsm, help narrow down and
+ * The logging statements in this test, and RFPHelper.sys.mjs, help narrow down and
* illustrate the issue.
*/
info(caseString + "We hit the weird resize bug. Resize it again.");
diff --git a/browser/components/resistfingerprinting/test/browser/browser_navigator.js b/browser/components/resistfingerprinting/test/browser/browser_navigator.js
index fb2c539194..2e7e76fdfb 100644
--- a/browser/components/resistfingerprinting/test/browser/browser_navigator.js
+++ b/browser/components/resistfingerprinting/test/browser/browser_navigator.js
@@ -339,7 +339,7 @@ async function testWorkerNavigator() {
// test in Fission.
if (SpecialPowers.useRemoteSubframes) {
await new Promise(resolve => {
- let observer = (subject, topic, data) => {
+ let observer = (subject, topic) => {
if (topic === "ipc:content-shutdown") {
Services.obs.removeObserver(observer, "ipc:content-shutdown");
resolve();
diff --git a/browser/components/resistfingerprinting/test/browser/browser_spoofing_keyboard_event.js b/browser/components/resistfingerprinting/test/browser/browser_spoofing_keyboard_event.js
index a8f9db9edc..c070c7485b 100644
--- a/browser/components/resistfingerprinting/test/browser/browser_spoofing_keyboard_event.js
+++ b/browser/components/resistfingerprinting/test/browser/browser_spoofing_keyboard_event.js
@@ -2081,7 +2081,7 @@ async function testKeyEvent(aTab, aTestCase) {
// a custom event 'resultAvailable' for informing the script to check the
// result.
await new Promise(resolve => {
- function eventHandler(aEvent) {
+ function eventHandler() {
verifyKeyboardEvent(
JSON.parse(resElement.value),
result,
diff --git a/browser/components/resistfingerprinting/test/browser/browser_timezone.js b/browser/components/resistfingerprinting/test/browser/browser_timezone.js
index d2aefff01c..13deeb5b26 100644
--- a/browser/components/resistfingerprinting/test/browser/browser_timezone.js
+++ b/browser/components/resistfingerprinting/test/browser/browser_timezone.js
@@ -55,6 +55,15 @@ async function verifySpoofed() {
"The hours reports in UTC timezone."
);
is(date.getTimezoneOffset(), 0, "The difference with UTC timezone is 0.");
+
+ let parser = new DOMParser();
+ let doc = parser.parseFromString("<p></p>", "text/html");
+ let lastModified = new Date(
+ doc.lastModified.replace(/(\d{2})\/(\d{2})\/(\d{4})/, "$3-$1-$2")
+ );
+ // Use ceil to account for the time passed to run the other statements
+ let offset = Math.ceil((lastModified - new Date()) / 1000);
+ is(offset, 0, "document.lastModified does not leak the timezone.");
}
// Run test in the context of the page.
diff --git a/browser/components/resistfingerprinting/test/browser/file_animationapi_iframee.html b/browser/components/resistfingerprinting/test/browser/file_animationapi_iframee.html
index da86656bd4..758176691b 100644
--- a/browser/components/resistfingerprinting/test/browser/file_animationapi_iframee.html
+++ b/browser/components/resistfingerprinting/test/browser/file_animationapi_iframee.html
@@ -2,7 +2,7 @@
<head>
<meta charset="utf8">
<script>
-function waitForCondition(aCond, aCallback, aErrorMsg) {
+function waitForCondition(aCond, aCallback) {
var tries = 0;
var interval = setInterval(() => {
if (tries >= 30) {
diff --git a/browser/components/resistfingerprinting/test/browser/file_animationapi_iframer.html b/browser/components/resistfingerprinting/test/browser/file_animationapi_iframer.html
index 234661a6a9..c32bd40610 100644
--- a/browser/components/resistfingerprinting/test/browser/file_animationapi_iframer.html
+++ b/browser/components/resistfingerprinting/test/browser/file_animationapi_iframer.html
@@ -5,7 +5,7 @@
<title></title>
<script src="shared_test_funcs.js"></script>
<script>
-async function runTheTest(iframe_domain, cross_origin_domain, extraData) {
+async function runTheTest(iframe_domain, cross_origin_domain) {
const iframes = document.querySelectorAll("iframe");
iframes[0].src = `https://${iframe_domain}/browser/browser/components/resistfingerprinting/test/browser/file_animationapi_iframee.html`;
await waitForMessage("ready", `https://${iframe_domain}`);
diff --git a/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_aboutblank_popupmaker.html b/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_aboutblank_popupmaker.html
index 23fd058c44..d8788edee9 100644
--- a/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_aboutblank_popupmaker.html
+++ b/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_aboutblank_popupmaker.html
@@ -33,7 +33,7 @@ function createPopup() {
window.addEventListener("load", createPopup);
console.log("TKTK: Adding initial load");
-async function runTheTest(iframe_domain, cross_origin_domain, mode) {
+async function runTheTest(iframe_domain, cross_origin_domain) {
await new Promise(r => setTimeout(r, 2000));
console.log("TKTK: runTheTest() popup =", (popup === undefined ? "undefined" : "something"));
if (document.readyState !== 'complete') {
diff --git a/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_blob_popupmaker.html b/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_blob_popupmaker.html
index ae08111e61..ea38234def 100644
--- a/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_blob_popupmaker.html
+++ b/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_blob_popupmaker.html
@@ -3,7 +3,7 @@
<script src="shared_test_funcs.js"></script>
<script type="text/javascript">
var popup;
-async function runTheTest(iframe_domain, cross_origin_domain, mode) {
+async function runTheTest(iframe_domain, cross_origin_domain) {
let s = `<html><script>
console.log("TKTK: Loaded popup");
function give_result() {
diff --git a/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_blobcrossorigin_iframer.html b/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_blobcrossorigin_iframer.html
index d03c514fc7..9c52f5774a 100644
--- a/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_blobcrossorigin_iframer.html
+++ b/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_blobcrossorigin_iframer.html
@@ -5,7 +5,7 @@
<title></title>
<script src="shared_test_funcs.js"></script>
<script>
-async function runTheTest(iframe_domain, cross_origin_domain) {
+async function runTheTest(iframe_domain) {
// Set up the frame
const iframes = document.querySelectorAll("iframe");
iframes[0].src = `https://${iframe_domain}/browser/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_blobcrossorigin_iframee.html`;
diff --git a/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_data_popupmaker.html b/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_data_popupmaker.html
index 188d78ee6e..75ae15313b 100644
--- a/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_data_popupmaker.html
+++ b/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_data_popupmaker.html
@@ -3,7 +3,7 @@
<script src="shared_test_funcs.js"></script>
<script type="text/javascript">
var popup;
-async function runTheTest(iframe_domain, cross_origin_domain, mode) {
+async function runTheTest(iframe_domain, cross_origin_domain) {
let s = `<!DOCTYPE html><html><script>
function give_result() {
return {
diff --git a/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_iframer.html b/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_iframer.html
index 3de74bc9a3..b3eb2e6ad2 100644
--- a/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_iframer.html
+++ b/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_iframer.html
@@ -5,7 +5,7 @@
<title></title>
<script src="shared_test_funcs.js"></script>
<script>
-async function runTheTest(iframe_domain, cross_origin_domain, mode) {
+async function runTheTest(iframe_domain, cross_origin_domain) {
var child_reference;
let url = `https://${iframe_domain}/browser/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_iframee.html?mode=`
let params = new URLSearchParams(document.location.search);
diff --git a/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_sandboxediframe_double_framee.html b/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_sandboxediframe_double_framee.html
index 8a4373c703..f4ea70e466 100644
--- a/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_sandboxediframe_double_framee.html
+++ b/browser/components/resistfingerprinting/test/browser/file_hwconcurrency_sandboxediframe_double_framee.html
@@ -3,7 +3,7 @@
<body>
<output id="result"></output>
<script type="text/javascript">
- window.addEventListener("load", function listener(event) {
+ window.addEventListener("load", function listener() {
parent.postMessage(["frame_ready"], "*");
});
window.addEventListener("message", function listener(event) {
diff --git a/browser/components/resistfingerprinting/test/browser/file_navigator_iframee.html b/browser/components/resistfingerprinting/test/browser/file_navigator_iframee.html
index 8e312d1d7b..350d05f6aa 100644
--- a/browser/components/resistfingerprinting/test/browser/file_navigator_iframee.html
+++ b/browser/components/resistfingerprinting/test/browser/file_navigator_iframee.html
@@ -52,7 +52,7 @@ window.addEventListener("message", async function listener(event) {
result.framee_crossOrigin_userAgentHTTPHeader = content;
});
- Promise.all([one, two]).then((values) => {
+ Promise.all([one, two]).then(() => {
parent.postMessage(result, "*")
});
}
diff --git a/browser/components/resistfingerprinting/test/browser/file_reduceTimePrecision_iframer.html b/browser/components/resistfingerprinting/test/browser/file_reduceTimePrecision_iframer.html
index 4d9c81ec8d..499d9d8194 100644
--- a/browser/components/resistfingerprinting/test/browser/file_reduceTimePrecision_iframer.html
+++ b/browser/components/resistfingerprinting/test/browser/file_reduceTimePrecision_iframer.html
@@ -5,7 +5,7 @@
<title></title>
<script src="shared_test_funcs.js"></script>
<script>
-async function runTheTest(iframe_domain, cross_origin_domain, extraData) {
+async function runTheTest(iframe_domain, cross_origin_domain) {
const iframes = document.querySelectorAll("iframe");
iframes[0].src = `https://${iframe_domain}/browser/browser/components/resistfingerprinting/test/browser/file_reduceTimePrecision_iframee.html`;
await waitForMessage("ready", `https://${iframe_domain}`);
diff --git a/browser/components/resistfingerprinting/test/browser/head.js b/browser/components/resistfingerprinting/test/browser/head.js
index 3c3f588960..8973839220 100644
--- a/browser/components/resistfingerprinting/test/browser/head.js
+++ b/browser/components/resistfingerprinting/test/browser/head.js
@@ -372,9 +372,7 @@ async function testWindowOpen(
aTargetWidth,
aTargetHeight,
aMaxAvailWidth,
- aMaxAvailHeight,
- aPopupChromeUIWidth,
- aPopupChromeUIHeight
+ aMaxAvailHeight
) {
// If the target size is greater than the maximum available content size,
// we set the target size to it.
@@ -687,7 +685,7 @@ async function runActualTest(uri, testFunction, expectedResults, extraData) {
let filterExtraData = function (x) {
let banned_keys = ["private_window", "etp_reload", "noopener", "await_uri"];
return Object.fromEntries(
- Object.entries(x).filter(([k, v]) => !banned_keys.includes(k))
+ Object.entries(x).filter(([k]) => !banned_keys.includes(k))
);
};
diff --git a/browser/components/resistfingerprinting/test/mochitest/test_geolocation.html b/browser/components/resistfingerprinting/test/mochitest/test_geolocation.html
index 95394ddb56..1c8828ee9a 100644
--- a/browser/components/resistfingerprinting/test/mochitest/test_geolocation.html
+++ b/browser/components/resistfingerprinting/test/mochitest/test_geolocation.html
@@ -30,7 +30,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1372069
function doTest_getCurrentPosition() {
navigator.geolocation.getCurrentPosition(
- (position) => {
+ () => {
ok(true, "Success callback is expected to be called");
doTest_watchPosition();
},
@@ -43,7 +43,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1372069
function doTest_watchPosition() {
let wid = navigator.geolocation.watchPosition(
- (position) => {
+ () => {
ok(true, "Success callback is expected to be called");
navigator.geolocation.clearWatch(wid);
SimpleTest.finish();