mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
This reverts commit 80ee469429.
Lifecycle events are not ready yet to support the setContent scenario.
The prerequisite for this is
https://chromium-review.googlesource.com/c/chromium/src/+/747805 that
might not land soon due to technical concerns.
This commit is contained in:
11
test/test.js
11
test/test.js
@@ -2302,17 +2302,6 @@ describe('Page', function() {
|
||||
const result = await page.content();
|
||||
expect(result).toBe(`${doctype}${expectedOutput}`);
|
||||
}));
|
||||
it('should await resources to load', SX(async function() {
|
||||
const imgPath = '/img.png';
|
||||
let imgResponse = null;
|
||||
server.setRoute(imgPath, (req, res) => imgResponse = res);
|
||||
let loaded = false;
|
||||
const contentPromise = page.setContent(`<img src="${PREFIX + imgPath}"></img>`).then(() => loaded = true);
|
||||
await server.waitForRequest(imgPath);
|
||||
expect(loaded).toBe(false);
|
||||
imgResponse.end();
|
||||
await contentPromise;
|
||||
}));
|
||||
});
|
||||
|
||||
describe('Network Events', function() {
|
||||
|
||||
Reference in New Issue
Block a user