Skip to content

[BUG] webkit reports incorrect download url #5537

Closed

Description

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

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions