Skip to content

Commit

Permalink
feat(firefox): roll Firefox to 1387
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov committed Mar 10, 2023
1 parent a619ea4 commit e0eb465
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 20 deletions.
4 changes: 2 additions & 2 deletions packages/playwright-core/browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
},
{
"name": "firefox",
"revision": "1384",
"revision": "1387",
"installByDefault": true,
"browserVersion": "109.0"
},
{
"name": "firefox-beta",
"revision": "1386",
"revision": "1389",
"installByDefault": false,
"browserVersion": "110.0b7"
},
Expand Down
15 changes: 1 addition & 14 deletions packages/playwright-core/src/server/firefox/ffPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,20 +393,7 @@ export class FFPage implements PageDelegate {
}

async reload(): Promise<void> {
const mainFrame = this._page._frameManager.mainFrame();
// This is a workaround for https://github.com/microsoft/playwright/issues/21145
let hash = '';
try {
hash = (new URL(mainFrame.url())).hash;
} catch (e) {
// Ignore URL parsing error, if any.
}
if (hash.length) {
const context = await mainFrame._utilityContext();
await context.rawEvaluateJSON(`void window.location.reload();`);
} else {
await this._session.send('Page.reload');
}
await this._session.send('Page.reload');
}

async goBack(): Promise<boolean> {
Expand Down
3 changes: 1 addition & 2 deletions tests/page/page-evaluate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,8 @@ it('should work with overridden globalThis.Window/Document/Node', async ({ page,
}
});

it('should work with overridden URL/Date/RegExp', async ({ page, server, browserName }) => {
it('should work with overridden URL/Date/RegExp', async ({ page, server }) => {
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/21109' });
it.fixme(browserName === 'firefox');
const testCases = [
// @ts-ignore
() => globalThis.URL = 'foo',
Expand Down
3 changes: 1 addition & 2 deletions tests/page/page-history.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,8 @@ it('page.reload should work on a page with a hash', async ({ page, server }) =>
await expect(page).toHaveURL(server.EMPTY_PAGE + '#hash');
});

it('page.reload should work on a page with a hash at the end', async ({ page, server, browserName }) => {
it('page.reload should work on a page with a hash at the end', async ({ page, server }) => {
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/21430' });
it.fixme(browserName === 'firefox');
await page.goto(server.EMPTY_PAGE + '#');
await page.reload();
await expect(page).toHaveURL(server.EMPTY_PAGE + '#');
Expand Down

0 comments on commit e0eb465

Please sign in to comment.