browser_zoom.js (738B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 const URL = "data:text/html,foo"; 7 8 addRDMTaskWithPreAndPost( 9 URL, 10 async function pre({ browser }) { 11 info("Setting zoom"); 12 // It's important that we do this so that we don't race with FullZoom's use 13 // of ContentSettings, which would reset the zoom. 14 FullZoom.setZoom(2.0, browser); 15 }, 16 async function task({ browser, ui }) { 17 is( 18 ZoomManager.getZoomForBrowser(browser), 19 2.0, 20 "Zoom shouldn't have got lost" 21 ); 22 23 // wait for the list of devices to be loaded to prevent pending promises 24 await waitForDeviceAndViewportState(ui); 25 }, 26 async function post() {} 27 );