Update web-platform-tests to revision be5419e845d39089ba6dc338c1bd0fa279108317

This commit is contained in:
Josh Matthews 2018-01-04 13:44:24 -05:00
parent aa199307c8
commit 2b6f573eb5
3440 changed files with 109438 additions and 41750 deletions

View file

@ -11,15 +11,15 @@
async_test(t => {
const errorFrame = document.createElement("iframe");
errorFrame.addEventListener("load", function () {
errorFrame.addEventListener("load", t.step_func(function () {
errorFrame.contentWindow.addEventListener(
"beforeunload", t.unreached_func("Navigated instead of downloading"));
errorFrame.contentDocument.querySelector("#error-url").click();
t.step_timeout(() => t.done(), 1000);
});
}));
errorFrame.src = "resources/a-download-404.html";
document.body.appendChild(errorFrame);
}, "Do not navigate to 404 for anchor with download");
</script>
</body>
</body>

View file

@ -7,18 +7,27 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<a id="blob-url" download="foo.html">Click me</a>
<body>
<script>
"use strict";
async_test(t => {
const frame = document.createElement("iframe");
const string = "test";
const blob = new Blob([string], { type: "text/html" });
frame.addEventListener("load", t.step_func(function () {
frame.contentWindow.addEventListener(
"beforeunload", t.unreached_func("Navigated instead of downloading"));
const string = "test";
const blob = new Blob([string], { type: "text/html" });
const link = document.querySelector("#blob-url");
link.href = URL.createObjectURL(blob);
const link = frame.contentDocument.querySelector("#blob-url");
link.href = URL.createObjectURL(blob);
link.click();
link.click();
done();
t.step_timeout(() => t.done(), 1000);
}));
frame.src = "resources/a-download-click.html";
document.body.appendChild(frame);
}, "Clicking on an <a> element with a download attribute must not throw an exception");
</script>
</body>

View file

@ -0,0 +1,2 @@
<!doctype html>
<a id="blob-url" download="foo.html">Click me</a>