Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] webkit reports incorrect download url #5537

Closed
aslushnikov opened this issue Feb 20, 2021 · 0 comments · Fixed by #6588
Closed

[BUG] webkit reports incorrect download url #5537

aslushnikov opened this issue Feb 20, 2021 · 0 comments · Fixed by #6588
Assignees

Comments

@aslushnikov
Copy link
Collaborator

consider the following test:

  it('should report proper download.url() when download is from download attribute', async ({browser, server}) => {
    const page = await browser.newPage({ acceptDownloads: true });
    await page.goto(server.PREFIX + '/empty.html');
    await page.setContent(`<a href="${server.PREFIX}/chromium-linux.zip" download="foo.zip">download</a>`);
    const [ download ] = await Promise.all([
      page.waitForEvent('download'),
      page.click('a')
    ]);
    expect(download.url()).toBe(`${server.PREFIX}/chromium-linux.zip`);
    await page.close();
  });

This test fails on Webkit since download.url() is considered to be page url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants