зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1352305 - Part2: Add a test case for making sure dialog windows will not be enforced to rounded sizes when fingerprinting resistance is enabled. r=Ehsan
A browser chrome test which ensures the dialog windows will not be enforced to be rounded sizes when fingerprinting resistance is enabled. MozReview-Commit-ID: LQG13FMANav --HG-- extra : rebase_source : 98d1ca63d3349920d7314624cea7f5eb3691b93c
This commit is contained in:
Родитель
a7973a0b20
Коммит
3a39f96514
|
@ -4,6 +4,7 @@ support-files =
|
|||
file_dummy.html
|
||||
head.js
|
||||
|
||||
[browser_roundedWindow_dialogWindow.js]
|
||||
[browser_roundedWindow_newWindow.js]
|
||||
[browser_roundedWindow_open_max.js]
|
||||
[browser_roundedWindow_open_mid.js]
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/**
|
||||
* Bug 1352305 - A test case for dialog windows that it should not be rounded
|
||||
* even after fingerprinting resistance is enabled.
|
||||
*/
|
||||
|
||||
async function test_dialog_window() {
|
||||
let diagWin;
|
||||
|
||||
await new Promise(resolve => {
|
||||
// Open a dialog window which is not rounded size.
|
||||
diagWin = window.openDialog("about:blank", null,
|
||||
"innerWidth=250,innerHeight=350");
|
||||
|
||||
diagWin.addEventListener("load", function() {
|
||||
resolve();
|
||||
}, {once: true});
|
||||
});
|
||||
|
||||
is(diagWin.innerWidth, 250, "The dialog window doesn't have a rounded size.");
|
||||
is(diagWin.innerHeight, 350, "The dialog window doesn't have a rounded size.");
|
||||
|
||||
await BrowserTestUtils.closeWindow(diagWin);
|
||||
}
|
||||
|
||||
add_task(async function setup() {
|
||||
await SpecialPowers.pushPrefEnv({"set":
|
||||
[["privacy.resistFingerprinting", true]]
|
||||
});
|
||||
});
|
||||
|
||||
add_task(test_dialog_window);
|
||||
|
||||
add_task(async function test_dialog_window_without_resistFingerprinting() {
|
||||
// Test dialog windows with 'privacy.resistFingerprinting' is false.
|
||||
await SpecialPowers.pushPrefEnv({"set":
|
||||
[["privacy.resistFingerprinting", false]]
|
||||
});
|
||||
|
||||
await test_dialog_window();
|
||||
});
|
Загрузка…
Ссылка в новой задаче