mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 82cecba576456d05c09894749379df1013ab488f
This commit is contained in:
parent
de9c84f686
commit
60b62482da
145 changed files with 2705 additions and 367 deletions
|
@ -9,6 +9,7 @@
|
|||
|
||||
<script>
|
||||
"use strict";
|
||||
setup({ single_test: true });
|
||||
|
||||
const sourceIFrame = document.createElement("iframe");
|
||||
sourceIFrame.setAttribute("sandbox", "allow-same-origin");
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
<script>
|
||||
"use strict";
|
||||
setup({ single_test: true });
|
||||
|
||||
const sourceIFrame = document.createElement("iframe");
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
<script>
|
||||
"use strict";
|
||||
setup({ single_test: true });
|
||||
|
||||
const iframe = document.createElement("iframe");
|
||||
let loadCount = 0;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<div id="log"></div>
|
||||
<script>
|
||||
"use strict";
|
||||
setup({ single_test: true });
|
||||
|
||||
const iframe = document.createElement("iframe");
|
||||
iframe.src = "support/ufoo";
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
<script>
|
||||
"use strict";
|
||||
setup({ single_test: true });
|
||||
|
||||
const sourceIFrame = document.createElement("iframe");
|
||||
let sourceLoadCount = 0;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<script src="/common/media.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
// https://html.spec.whatwg.org/#ready-states says:
|
||||
//
|
||||
// HAVE_FUTURE_DATA: "the text tracks are ready".
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<iframe src="about:blank"></iframe>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
onload = function() {
|
||||
var ifr = document.getElementsByTagName('iframe')[0];
|
||||
ifr.contentDocument.body.appendChild(ifr.contentDocument.createElement('p')).textContent = 'Modified document';
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<iframe src="about:blank"></iframe>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
onload = function() {
|
||||
var ifr = document.getElementsByTagName('iframe')[0];
|
||||
ifr.contentDocument.open();
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<iframe src="support/blank.htm"></iframe>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
onload = function() {
|
||||
var ifr = document.getElementsByTagName('iframe')[0];
|
||||
ifr.contentDocument.body.appendChild(ifr.contentDocument.createElement('p')).textContent = 'Modified document';
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<iframe src="support/blank.htm"></iframe>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
onload = function(){
|
||||
var ifr = document.getElementsByTagName('iframe')[0];
|
||||
ifr.contentDocument.open();
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
<!--
|
||||
Test same-document navigation inside an srcdoc iframe using location.hash
|
||||
-->
|
||||
<title>same-document navigation inside an srcdoc iframe using location.hash</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<script>
|
||||
async function test() {
|
||||
promise_test(async () => {
|
||||
// Wait until 'document' is available.
|
||||
await new Promise(resolve => window.addEventListener('load', resolve));
|
||||
|
||||
|
@ -66,8 +64,5 @@
|
|||
await hash_changed;
|
||||
assert_equals(iframe.contentWindow.location.href, "about:srcdoc#2");
|
||||
}
|
||||
|
||||
done();
|
||||
}
|
||||
test();
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
|
||||
var c = document.createElement("canvas"),
|
||||
con = c.getContext("2d"),
|
||||
img = document.createElement("img")
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
setup({explicit_done:true});
|
||||
setup({single_test:true});
|
||||
const image_was_loaded = () => {
|
||||
const iframe = document.getElementById("iframe");
|
||||
// Resize the iframe
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<p id="display"><img src="image.png"></p>
|
||||
<script>
|
||||
setup({ single_test: true });
|
||||
|
||||
function check() {
|
||||
var img = document.querySelector("img");
|
||||
assert_true(img.complete, "By onload, image should have loaded");
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>search event should not be supported</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/resources/testdriver.js"></script>
|
||||
<script src="/resources/testdriver-vendor.js"></script>
|
||||
<input id=input type=search incremental>
|
||||
<script>
|
||||
promise_test(async t => {
|
||||
const input = document.getElementById('input');
|
||||
const eventWatcher = new EventWatcher(t, input, ['search', 'keypress']);
|
||||
await Promise.all([
|
||||
test_driver.send_keys(input, 'x'),
|
||||
eventWatcher.wait_for(['keypress'])
|
||||
]);
|
||||
// During this timeout, the search event will fire, if it's supported,
|
||||
// which fails the test since the event watcher isn't expecting it.
|
||||
await new Promise(resolve => t.step_timeout(resolve, 1000));
|
||||
});
|
||||
</script>
|
|
@ -73,6 +73,18 @@ t('form', 'meter');
|
|||
t('item', 'form');
|
||||
t('namedItem', 'form');
|
||||
|
||||
// Never specified but implemented in WebKit/Chromium
|
||||
test(() => {
|
||||
assert_false("onsearch" in window);
|
||||
}, "window.onsearch should not be supported");
|
||||
|
||||
test(() => {
|
||||
assert_false("onsearch" in document);
|
||||
}, "document.onsearch should not be supported");
|
||||
|
||||
t('onsearch', 'input');
|
||||
t('incremental', 'input');
|
||||
|
||||
// <input name=isindex>
|
||||
// removed in https://github.com/whatwg/html/commit/5c44abc734eb483f9a7ec79da5844d2fe63d9c3b
|
||||
async_test(function() {
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script>
|
||||
async_test(t => {
|
||||
const input = document.createElement('input');
|
||||
input.type = 'checkbox';
|
||||
input.addEventListener('change', t.step_func_done(() => {}));
|
||||
input.dispatchEvent(new MouseEvent('click'));
|
||||
}, 'This test will pass if <input type=checkbox> emits change events while detached from document.body');
|
||||
</script>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script>
|
||||
async_test(t => {
|
||||
const input = document.createElement('input');
|
||||
input.type = 'radio';
|
||||
input.addEventListener('change', t.step_func_done(() => {}));
|
||||
input.dispatchEvent(new MouseEvent('click'));
|
||||
}, 'This test will pass if <input type=radio> emits change events while detached from document.body');
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue