mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 945323 - Add mochitest to ensure that download attribute on anchor ('a') tag is respected by the DOM Downloads API. r=qdot
This commit is contained in:
parent
cffb74e865
commit
8da5d4aecc
@ -26,7 +26,6 @@ SimpleTest.waitForExplicitFinish();
|
||||
var index = -1;
|
||||
var todayDate = new Date();
|
||||
var baseServeURL = "http://mochi.test:8888/tests/dom/downloads/tests/";
|
||||
var baseDownloadPath = "/mnt/sdcard/downloads/";
|
||||
var lastKnownCurrentBytes = 0;
|
||||
|
||||
function next() {
|
||||
@ -45,11 +44,12 @@ function next() {
|
||||
function checkConsistentDownloadAttributes(download) {
|
||||
var href = document.getElementById("download1").getAttribute("href");
|
||||
var expectedServeURL = baseServeURL + href;
|
||||
var expectedDownloadPath = baseDownloadPath + "test.bin";
|
||||
var destinationRegEx = /test\(?[0-9]*\)?\.bin$/;
|
||||
|
||||
// bug 945323: Download path isn't honoring download attribute
|
||||
todo(download.path === expectedDownloadPath,
|
||||
"Download path = " + expectedDownloadPath);
|
||||
ok(destinationRegEx.test(download.path),
|
||||
"Download path '" + download.path +
|
||||
"' should match '" + destinationRegEx + "' regexp.");
|
||||
|
||||
ok(download.startTime >= todayDate,
|
||||
"Download start time should be greater than or equal to today");
|
||||
|
Loading…
Reference in New Issue
Block a user