Update web-platform-tests to revision 81962ac8802223d038b188b6f9cb88a0a9c5beee

This commit is contained in:
WPT Sync Bot 2018-05-18 22:02:29 -04:00
parent fe1a057bd1
commit 24183668c4
1960 changed files with 29853 additions and 10555 deletions

View file

@ -16,11 +16,6 @@
</div>
<script>
var host = document.querySelector("#host");
var shadow = host.attachShadow({ mode: "open" });
var tmpl = document.querySelector("template#shadow-dom");
var clone = document.importNode(tmpl.content, true);
shadow.appendChild(clone);
function testLinkRelModification(testDiv, testLink) {
assert_equals(getComputedStyle(testDiv).color, "rgb(0, 128, 0)");
@ -38,6 +33,11 @@ test (() => {
}, "Removing stylesheet from link rel attribute should remove the stylesheet for light DOM");
test (() => {
var host = document.querySelector("#host");
var shadow = host.attachShadow({ mode: "open" });
var tmpl = document.querySelector("template#shadow-dom");
var clone = document.importNode(tmpl.content, true);
shadow.appendChild(clone);
testLinkRelModification(shadow.querySelector("#shadow-div"),
shadow.querySelector("#shadow-link"));
}, "Removing stylesheet from link rel attribute should remove the stylesheet for shadow DOM");

View file

@ -156,6 +156,7 @@
<img srcset='/images/green-1x1.png?f15 50w, /images/green-16x16.png?f15 51w' sizes='0.1dpi'>
<img srcset='/images/green-1x1.png?f16 50w, /images/green-16x16.png?f16 51w' sizes='0.1dpcm'>
<img srcset='/images/green-1x1.png?f17 50w, /images/green-16x16.png?f17 51w' sizes='0.1dppx'>
<img srcset='/images/green-1x1.png?f17a 50w, /images/green-16x16.png?f17a 51w' sizes='0.1x'>
<img srcset='/images/green-1x1.png?f18 50w, /images/green-16x16.png?f18 51w' data-foo='1px' sizes='attr(data-foo, length, 1px)'>
<img srcset='/images/green-1x1.png?f19 50w, /images/green-16x16.png?f19 51w' data-foo='1' sizes='attr(data-foo, px, 1px)'>
<img srcset='/images/green-1x1.png?f20 50w, /images/green-16x16.png?f20 51w' sizes='toggle(1px)'>

View file

@ -0,0 +1,14 @@
promise_test(() => {
const form = document.body.appendChild(document.createElement("form")),
input = form.appendChild(document.createElement("input"));
input.type = "file";
input.name = "hi";
const fd = new FormData(form),
value = fd.get(input.name);
assert_true(value instanceof File, "value is a File");
assert_equals(value.name, "", "name");
assert_equals(value.type, "application/octet-stream", "type");
return new Response(value).text().then(body => {
assert_equals(body, "", "body");
});
}, "Empty <input type=file> is still serialized");

View file

@ -17,12 +17,12 @@
var t = async_test()
function test() {
var script = createScript('data:text\/javascript,log("Script #1 ran")');
var script = createScript('data:text\/javascript,log("Script %231 ran")');
var script2 = createScript('','log("Script #2 ran")');
if(script2) {
head.removeChild(script2);
}
var script3 = createScript('data:text\/javascript, log("Script #3 ran"); createScript(\'\', \'log("Script #4 ran")\')');
var script3 = createScript('data:text\/javascript, log("Script %233 ran"); createScript(\'\', \'log("Script #4 ran")\')');
if(script3) {
head.removeChild(script3);
}

View file

@ -20,4 +20,26 @@ test(() => {
assert_equals(importMetaOnDependentModule.url,
base + "/import-meta-dependent.js");
}, "import.meta.url in a dependent external script");
import { importMetaOnRootModule as hashedImportMetaOnRootModule1,
importMetaOnDependentModule as hashedImportMetaOnDependentModule1 }
from "./import-meta-root.js#1";
import { importMetaOnRootModule as hashedImportMetaOnRootModule2,
importMetaOnDependentModule as hashedImportMetaOnDependentModule2 }
from "./import-meta-root.js#2";
test(() => {
assert_equals(hashedImportMetaOnRootModule1.url,
base + "/import-meta-root.js#1");
assert_equals(hashedImportMetaOnRootModule2.url,
base + "/import-meta-root.js#2");
// Must not be affected
assert_equals(hashedImportMetaOnDependentModule1.url,
base + "/import-meta-dependent.js");
assert_equals(hashedImportMetaOnDependentModule2.url,
base + "/import-meta-dependent.js");
}, "import.meta.url when importing the module with different fragments");
</script>