Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions test/browsercontext.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,20 @@ describe('BrowserContext.route', () => {
expect(await response.text()).toBe('page');
await context.close();
});
it('should fall back to context.route', async({browser, server}) => {
const context = await browser.newContext();
await context.route('**/empty.html', route => {
route.fulfill({ status: 200, body: 'context' });
});
const page = await context.newPage();
await page.route('**/non-empty.html', route => {
route.fulfill({ status: 200, body: 'page' });
});
const response = await page.goto(server.EMPTY_PAGE);
expect(response.ok()).toBe(true);
expect(await response.text()).toBe('context');
await context.close();
});
});

describe('BrowserContext.setHTTPCredentials', function() {
Expand Down