Skip to content

Commit 9070a27

Browse files
authored
Merge pull request #20087 from timvandermeij/fix-intermittent-viewer
Fix the "must check that canvas perfectly fits the page whatever the zoom level" viewer integration test
2 parents b7a0f01 + a0f8cba commit 9070a27

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

test/integration/viewer_spec.mjs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -395,29 +395,13 @@ describe("PDF viewer", () => {
395395
it("must check that canvas perfectly fits the page whatever the zoom level is", async () => {
396396
await Promise.all(
397397
pages.map(async ([browserName, page]) => {
398-
if (browserName === "chrome") {
399-
// Skip the test for Chrome as `scrollIntoView` below hangs since
400-
// Puppeteer 24.5.0 and higher.
401-
// See https://github.com/mozilla/pdf.js/issues/19811.
402-
// TODO: Remove this check once the issue is fixed.
403-
return;
404-
}
405-
406398
// The pdf has a single page with a red background.
407399
// We set the viewer background to red, because when screenshoting
408400
// some part of the viewer background can be visible.
409401
// But here we don't care about the viewer background: we only
410402
// care about the page background and the canvas default color.
411-
412403
await page.evaluate(() => {
413404
document.body.style.background = "#ff0000";
414-
const toolbar = document.querySelector(".toolbar");
415-
toolbar.style.display = "none";
416-
});
417-
await page.waitForSelector(".toolbar", { visible: false });
418-
await page.evaluate(() => {
419-
const p = document.querySelector(`.page[data-page-number="1"]`);
420-
p.style.border = "none";
421405
});
422406

423407
for (let i = 0; ; i++) {

0 commit comments

Comments
 (0)