1
0
Fork 0
firefox/devtools/client/responsive/test/browser/browser_zoom.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

27 lines
738 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
const URL = "data:text/html,foo";
addRDMTaskWithPreAndPost(
URL,
async function pre({ browser }) {
info("Setting zoom");
// It's important that we do this so that we don't race with FullZoom's use
// of ContentSettings, which would reset the zoom.
FullZoom.setZoom(2.0, browser);
},
async function task({ browser, ui }) {
is(
ZoomManager.getZoomForBrowser(browser),
2.0,
"Zoom shouldn't have got lost"
);
// wait for the list of devices to be loaded to prevent pending promises
await waitForDeviceAndViewportState(ui);
},
async function post() {}
);