mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
Update web-platform-tests to revision e3cf1284464a4a3e46fd15e4138f8e32c6cecdd8
This commit is contained in:
parent
b20333a324
commit
c5c325d8bb
57 changed files with 1422 additions and 493 deletions
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<title>The copy event</title>
|
||||
<link rel="help" href="https://w3c.github.io/clipboard-apis/#clipboard-event-copy">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<p>Select and copy any part of this text to continue.
|
||||
<script>
|
||||
setup({explicit_timeout: true});
|
||||
async_test(t => {
|
||||
document.oncopy = t.step_func_done(event => {
|
||||
// Nothing can be asserted about the event target until
|
||||
// https://github.com/w3c/clipboard-apis/issues/70 is resolved.
|
||||
// assert_equals(event.target, document.body, 'event.target');
|
||||
assert_true(event.isTrusted, 'event.isTrusted');
|
||||
assert_true(event.composed, 'event.composed');
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<title>The cut event</title>
|
||||
<link rel="help" href="https://w3c.github.io/clipboard-apis/#clipboard-event-cut">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<input value="Select and cut any part of this text to continue" size="100">
|
||||
<script>
|
||||
setup({explicit_timeout: true});
|
||||
async_test(t => {
|
||||
document.oncut = t.step_func_done(event => {
|
||||
// Nothing can be asserted about the event target until
|
||||
// https://github.com/w3c/clipboard-apis/issues/70 is resolved.
|
||||
// assert_equals(event.target, document.body, 'event.target');
|
||||
assert_true(event.isTrusted, 'event.isTrusted');
|
||||
assert_true(event.composed, 'event.composed');
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<title>The paste event</title>
|
||||
<link rel="help" href="https://w3c.github.io/clipboard-apis/#clipboard-event-paste">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id=log></div>
|
||||
<input placeholder="Paste any text here to continue" size="100">
|
||||
<p>Some pre-selected text to copy for convenience</p>
|
||||
<script>
|
||||
setup({explicit_timeout: true});
|
||||
async_test(t => {
|
||||
getSelection().selectAllChildren(document.querySelector('p'));
|
||||
document.onpaste = t.step_func_done(event => {
|
||||
// Nothing can be asserted about the event target until
|
||||
// https://github.com/w3c/clipboard-apis/issues/70 is resolved.
|
||||
// assert_equals(event.target, document.body, 'event.target');
|
||||
assert_true(event.isTrusted, 'event.isTrusted');
|
||||
assert_true(event.composed, 'event.composed');
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue