mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Fix Page.setContent method
The patch fixes an unfortunate bug in Page.setContent method and adds a test to cover it. References #50.
This commit is contained in:
@@ -497,6 +497,13 @@ describe('Puppeteer', function() {
|
||||
expect(request.headers['foo']).toBe('bar');
|
||||
}));
|
||||
});
|
||||
describe('Page.setContent', function() {
|
||||
it('should work', SX(async function() {
|
||||
await page.setContent('<div>hello</div>');
|
||||
let result = await page.evaluate(() => document.body.innerHTML);
|
||||
expect(result).toBe('<div>hello</div>');
|
||||
}));
|
||||
});
|
||||
describe('Network Events', function() {
|
||||
it('Page.Events.Request', SX(async function() {
|
||||
let requests = [];
|
||||
|
||||
Reference in New Issue
Block a user