Skip to content

Commit

Permalink
chore(test): remove the server.EMPTY_PAGE2 asset (#3967)
Browse files Browse the repository at this point in the history
Firefox used to have a bug that prevented adding iframes with the
same URL as main frame. In this case, we used the EMPTY_PAGE2
so that it doesn't clash with top-level EMPTY_PAGE.

The bug seems to be fixed after we rolled onto a fresh Firefox;
there's no more need for this test asset.
  • Loading branch information
aslushnikov committed Feb 9, 2019
1 parent cfefd61 commit 1ce578b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
Empty file removed test/assets/empty2.html
Empty file.
2 changes: 1 addition & 1 deletion test/elementhandle.spec.js
Expand Up @@ -132,7 +132,7 @@ module.exports.addTests = function({testRunner, expect}) {
describe('ElementHandle.contentFrame', function() {
it('should work', async({page,server}) => {
await page.goto(server.EMPTY_PAGE);
await utils.attachFrame(page, 'frame1', server.EMPTY_PAGE2);
await utils.attachFrame(page, 'frame1', server.EMPTY_PAGE);
const elementHandle = await page.$('#frame1');
const frame = await elementHandle.contentFrame();
expect(frame).toBe(page.frames()[1]);
Expand Down
2 changes: 0 additions & 2 deletions test/test.js
Expand Up @@ -46,7 +46,6 @@ beforeAll(async state => {
state.server.PREFIX = `http://localhost:${port}`;
state.server.CROSS_PROCESS_PREFIX = `http://127.0.0.1:${port}`;
state.server.EMPTY_PAGE = `http://localhost:${port}/empty.html`;
state.server.EMPTY_PAGE2 = `http://localhost:${port}/empty2.html`;

const httpsPort = port + 1;
state.httpsServer = await TestServer.createHTTPS(assetsPath, httpsPort);
Expand All @@ -55,7 +54,6 @@ beforeAll(async state => {
state.httpsServer.PREFIX = `https://localhost:${httpsPort}`;
state.httpsServer.CROSS_PROCESS_PREFIX = `https://127.0.0.1:${httpsPort}`;
state.httpsServer.EMPTY_PAGE = `https://localhost:${httpsPort}/empty.html`;
state.httpsServer.EMPTY_PAGE2 = `https://localhost:${httpsPort}/empty2.html`;
});

afterAll(async({server, httpsServer}) => {
Expand Down
6 changes: 3 additions & 3 deletions test/waittask.spec.js
Expand Up @@ -253,7 +253,7 @@ module.exports.addTests = function({testRunner, expect, product, Errors}) {

it('Page.waitForSelector is shortcut for main frame', async({page, server}) => {
await page.goto(server.EMPTY_PAGE);
await utils.attachFrame(page, 'frame1', server.EMPTY_PAGE2);
await utils.attachFrame(page, 'frame1', server.EMPTY_PAGE);
const otherFrame = page.frames()[1];
const watchdog = page.waitForSelector('div');
await otherFrame.evaluate(addElement, 'div');
Expand All @@ -263,8 +263,8 @@ module.exports.addTests = function({testRunner, expect, product, Errors}) {
});

it('should run in specified frame', async({page, server}) => {
await utils.attachFrame(page, 'frame1', server.EMPTY_PAGE2);
await utils.attachFrame(page, 'frame2', server.EMPTY_PAGE2);
await utils.attachFrame(page, 'frame1', server.EMPTY_PAGE);
await utils.attachFrame(page, 'frame2', server.EMPTY_PAGE);
const frame1 = page.frames()[1];
const frame2 = page.frames()[2];
const waitForSelectorPromise = frame2.waitForSelector('div');
Expand Down

0 comments on commit 1ce578b

Please sign in to comment.