feat(firefox): Implement header overrides in request interception (#4142)

This patch makes sure header overrides in request interception are
functioning as expected.

Drive-by: teach test server to use utf-8 charset header for text files.
This commit is contained in:
Andrey Lushnikov
2019-03-08 14:26:13 -08:00
committed by GitHub
parent 5d6535ca0c
commit 42351c7fe5
4 changed files with 17 additions and 7 deletions

View File

@@ -717,7 +717,7 @@ module.exports.addTests = function({testRunner, expect, CHROME}) {
});
});
describe_fails_ffox('Request.continue', function() {
describe('Request.continue', function() {
it('should work', async({page, server}) => {
await page.setRequestInterception(true);
page.on('request', request => request.continue());
@@ -737,7 +737,7 @@ module.exports.addTests = function({testRunner, expect, CHROME}) {
]);
expect(request.headers['foo']).toBe('bar');
});
it('should redirect in a way non-observable to page', async({page, server}) => {
it_fails_ffox('should redirect in a way non-observable to page', async({page, server}) => {
await page.setRequestInterception(true);
page.on('request', request => {
const redirectURL = request.url().includes('/empty.html') ? server.PREFIX + '/consolelog.html' : undefined;
@@ -749,7 +749,7 @@ module.exports.addTests = function({testRunner, expect, CHROME}) {
expect(page.url()).toBe(server.EMPTY_PAGE);
expect(consoleMessage.text()).toBe('yellow');
});
it('should amend method', async({page, server}) => {
it_fails_ffox('should amend method', async({page, server}) => {
await page.goto(server.EMPTY_PAGE);
await page.setRequestInterception(true);
@@ -762,7 +762,7 @@ module.exports.addTests = function({testRunner, expect, CHROME}) {
]);
expect(request.method).toBe('POST');
});
it('should amend post data', async({page, server}) => {
it_fails_ffox('should amend post data', async({page, server}) => {
await page.goto(server.EMPTY_PAGE);
await page.setRequestInterception(true);