Bug 114865 - HTMLAnchorElement download attribute tests are broken
Summary: HTMLAnchorElement download attribute tests are broken
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-19 04:25 PDT by Xan Lopez
Modified: 2016-09-27 13:45 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xan Lopez 2013-04-19 04:25:53 PDT
There are four tests testing the download attribute for the anchor element:

anchor-download.html
anchor-nodownload-set.html
anchor-download-unset.html
anchor-nodownload.html

The latter two will, either by not having the download attr., or by having it removed with JS, not download the resource (a Blob object) set as href for the anchor element on click, and a navigation will happen. The new page will call notifyDone(), and the test will end.

The first two, though, *will* download the object, and the navigation will never happen. Since notifyDone() is not called here, the tests never finishes, and we have to wait until the timeout. This is what happens at least in the GTK+ and the BB port, so it makes me think that the test is just broken.

I suppose I could set a very small timeout after the click and make the test finish after that, but it seems hacky. Ideally we'd need to check somehow that the download happened after the click, and finish after that, but I'm not sure of what we would be the best way to do this.
Comment 1 Allan Sandfeld Jensen 2013-09-20 07:19:19 PDT
Oddly enough these tests will only pass if the download attribute feature is not enabled, since they expect behavior to be the same without and without the attribute.