mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision be5419e845d39089ba6dc338c1bd0fa279108317
This commit is contained in:
parent
aa199307c8
commit
2b6f573eb5
3440 changed files with 109438 additions and 41750 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
<!doctype html>
|
||||
<a id="blob-url" download="foo.html">Click me</a>
|
Loading…
Add table
Add a link
Reference in a new issue