mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-12 20:03:03 +03:00
feat(firefox): roll to r1291 (#8704)
Co-authored-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
parent
585807b3be
commit
1f43df3249
@ -13,7 +13,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "firefox",
|
"name": "firefox",
|
||||||
"revision": "1290",
|
"revision": "1291",
|
||||||
"installByDefault": true
|
"installByDefault": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -132,6 +132,7 @@ export class FFNetworkManager {
|
|||||||
this._requests.delete(request._id);
|
this._requests.delete(request._id);
|
||||||
response._requestFinished(responseEndTime);
|
response._requestFinished(responseEndTime);
|
||||||
}
|
}
|
||||||
|
response._setHttpVersion(event.protocolVersion);
|
||||||
this._page._frameManager.reportRequestFinished(request.request, response);
|
this._page._frameManager.reportRequestFinished(request.request, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
src/server/firefox/protocol.d.ts
vendored
1
src/server/firefox/protocol.d.ts
vendored
@ -908,6 +908,7 @@ export module Protocol {
|
|||||||
requestId: string;
|
requestId: string;
|
||||||
responseEndTime: number;
|
responseEndTime: number;
|
||||||
transferSize: number;
|
transferSize: number;
|
||||||
|
protocolVersion: string;
|
||||||
}
|
}
|
||||||
export type requestFailedPayload = {
|
export type requestFailedPayload = {
|
||||||
requestId: string;
|
requestId: string;
|
||||||
|
@ -203,6 +203,7 @@ export class HarTracer {
|
|||||||
|
|
||||||
const httpVersion = response.httpVersion();
|
const httpVersion = response.httpVersion();
|
||||||
harEntry.request.httpVersion = httpVersion;
|
harEntry.request.httpVersion = httpVersion;
|
||||||
|
harEntry.response.httpVersion = httpVersion;
|
||||||
|
|
||||||
const promise = response.body().then(buffer => {
|
const promise = response.body().then(buffer => {
|
||||||
const content = harEntry.response.content;
|
const content = harEntry.response.content;
|
||||||
|
@ -487,8 +487,9 @@ it('should return security details directly from response', async ({ contextFact
|
|||||||
expect(securityDetails).toEqual({issuer: 'puppeteer-tests', protocol: 'TLS 1.3', subjectName: 'puppeteer-tests', validFrom: 1550084863, validTo: 33086084863});
|
expect(securityDetails).toEqual({issuer: 'puppeteer-tests', protocol: 'TLS 1.3', subjectName: 'puppeteer-tests', validFrom: 1550084863, validTo: 33086084863});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should contain http2 for http2 requests', async ({ contextFactory, browserName }, testInfo) => {
|
it('should contain http2 for http2 requests', async ({ contextFactory, browserName, platform }, testInfo) => {
|
||||||
it.fixme(browserName === 'firefox' || browserName === 'webkit');
|
it.fixme(browserName === 'webkit' && platform === 'linux');
|
||||||
|
it.fixme(browserName === 'webkit' && platform === 'win32');
|
||||||
|
|
||||||
const server = http2.createSecureServer({
|
const server = http2.createSecureServer({
|
||||||
key: await fs.promises.readFile(path.join(__dirname, '..', 'utils', 'testserver', 'key.pem')),
|
key: await fs.promises.readFile(path.join(__dirname, '..', 'utils', 'testserver', 'key.pem')),
|
||||||
@ -508,6 +509,7 @@ it('should contain http2 for http2 requests', async ({ contextFactory, browserNa
|
|||||||
const log = await getLog();
|
const log = await getLog();
|
||||||
expect(log.entries[0].request.httpVersion).toBe('h2');
|
expect(log.entries[0].request.httpVersion).toBe('h2');
|
||||||
expect(log.entries[0].response.httpVersion).toBe('h2');
|
expect(log.entries[0].response.httpVersion).toBe('h2');
|
||||||
|
expect(Buffer.from(log.entries[0].response.content.text, 'base64').toString()).toBe('<h1>Hello World</h1>');
|
||||||
server.close();
|
server.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -126,9 +126,9 @@ it('should emulate reduced motion', async ({page}) => {
|
|||||||
await page.emulateMedia({ reducedMotion: null });
|
await page.emulateMedia({ reducedMotion: null });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should emulate forcedColors ', async ({page, browserName, isAndroid}) => {
|
it('should emulate forcedColors ', async ({page, browserName, isElectron}) => {
|
||||||
it.skip(browserName === 'webkit', 'https://bugs.webkit.org/show_bug.cgi?id=225281');
|
it.skip(browserName === 'webkit', 'https://bugs.webkit.org/show_bug.cgi?id=225281');
|
||||||
it.fixme(isAndroid);
|
it.fixme(isElectron);
|
||||||
expect(await page.evaluate(() => matchMedia('(forced-colors: none)').matches)).toBe(true);
|
expect(await page.evaluate(() => matchMedia('(forced-colors: none)').matches)).toBe(true);
|
||||||
await page.emulateMedia({ forcedColors: 'none' });
|
await page.emulateMedia({ forcedColors: 'none' });
|
||||||
expect(await page.evaluate(() => matchMedia('(forced-colors: none)').matches)).toBe(true);
|
expect(await page.evaluate(() => matchMedia('(forced-colors: none)').matches)).toBe(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user