mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(chromium): disable lazy loading iframes (#3535)
These do not play nicely with our "page is loaded when all frames are loaded" logic.
This commit is contained in:
parent
f13cebc66d
commit
0a22e2758a
@ -162,7 +162,7 @@ const DEFAULT_ARGS = [
|
||||
'--disable-dev-shm-usage',
|
||||
'--disable-extensions',
|
||||
// BlinkGenPropertyTrees disabled due to crbug.com/937609
|
||||
'--disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies',
|
||||
'--disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies,LazyFrameLoading',
|
||||
'--disable-hang-monitor',
|
||||
'--disable-ipc-flooding-protection',
|
||||
'--disable-popup-blocking',
|
||||
|
||||
6
test/assets/frames/lazy-frame.html
Normal file
6
test/assets/frames/lazy-frame.html
Normal file
@ -0,0 +1,6 @@
|
||||
<div style="height: 1000px; width: 1000px; background: red">One</div>
|
||||
<div style="height: 1000px; width: 1000px; background: blue">Two</div>
|
||||
<div style="height: 1000px; width: 1000px; background: red">Three</div>
|
||||
<div style="height: 1000px; width: 1000px; background: blue">Four</div>
|
||||
<div style="height: 1000px; width: 1000px; background: red">Five</div>
|
||||
<iframe loading="lazy" src='./frame.html'></iframe>
|
||||
@ -491,3 +491,8 @@ it.skip(true)('extraHttpHeaders should be pushed to provisional page', async({pa
|
||||
expect(htmlReq.headers['foo']).toBe(undefined);
|
||||
expect(cssReq.headers['foo']).toBe('bar');
|
||||
});
|
||||
|
||||
it('should work with lazy loading iframes', async({page, server}) => {
|
||||
await page.goto(server.PREFIX + '/frames/lazy-frame.html');
|
||||
expect(page.frames().length).toBe(2);
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user