Bug 1919094 - Fix CDP tests after bug 1917458. r=webdriver-reviewers,jdescottes

Same fix as for puppeteer.

Differential Revision: https://phabricator.services.mozilla.com/D222331
This commit is contained in:
Emilio Cobos Álvarez 2024-09-16 18:23:06 +00:00
parent d13f6b513b
commit 1d882fecbf

View File

@ -85,6 +85,10 @@ export class Emulation extends Domain {
browser.style.setProperty("min-height", targetHeight + "px");
browser.style.setProperty("max-height", targetHeight + "px");
browser.ownerDocument.synchronouslyUpdateRemoteBrowserDimensions(
/* aIncludeInactive = */ true
);
// Wait until the viewport has been resized
await this.executeInChild("_awaitViewportDimensions", {
width: targetWidth,