browser_roundedWindow_dialogWindow.js (1004B)
1 /** 2 * Bug 1352305 - A test case for dialog windows that it should not be rounded 3 * even after fingerprinting resistance is enabled. 4 */ 5 6 async function test_dialog_window() { 7 // Open a dialog window which is not rounded size. 8 let diagWin = window.openDialog( 9 "about:blank", 10 null, 11 "innerWidth=250,innerHeight=350" 12 ); 13 14 is(diagWin.innerWidth, 250, "The dialog window doesn't have a rounded size."); 15 is( 16 diagWin.innerHeight, 17 350, 18 "The dialog window doesn't have a rounded size." 19 ); 20 21 await BrowserTestUtils.closeWindow(diagWin); 22 } 23 24 add_setup(async function () { 25 await SpecialPowers.pushPrefEnv({ 26 set: [["privacy.resistFingerprinting", true]], 27 }); 28 }); 29 30 add_task(test_dialog_window); 31 32 add_task(async function test_dialog_window_without_resistFingerprinting() { 33 // Test dialog windows with 'privacy.resistFingerprinting' is false. 34 await SpecialPowers.pushPrefEnv({ 35 set: [["privacy.resistFingerprinting", false]], 36 }); 37 38 await test_dialog_window(); 39 });