mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Update web-platform-tests to revision e8bfc205e36ad699601212cd50083870bad9a75d
This commit is contained in:
parent
65dd6d4340
commit
ccdb0a3458
1428 changed files with 118036 additions and 9786 deletions
|
@ -0,0 +1,5 @@
|
|||
<!doctype html>
|
||||
<title>Interaction of UI input and the click in progress flag</title>
|
||||
<p>When you mouse click the checkbox below it should not be checked:</p>
|
||||
<p><input type=checkbox onclick=this.click()></p>
|
||||
<p>Now keyboard "click" the checkbox and confirm it's still not checked.</p>
|
|
@ -4,7 +4,8 @@
|
|||
<meta charset='utf-8'>
|
||||
<title>HTML Test: dropzone_attribute_data_item_kind_string</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='http://www.w3.org/html/editing/dnd/the-datatransfer-interface/'>
|
||||
<link rel='author' title='Domenic Denicola' href='mailto:d@domenic.com'>
|
||||
<link rel='help' href='https://html.spec.whatwg.org/multipage/#the-datatransfer-interface'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<style>
|
||||
|
@ -37,6 +38,27 @@
|
|||
test(function() {
|
||||
assert_equals(event.dataTransfer.effectAllowed, 'uninitialized');
|
||||
}, 'effectAllowed should be "uninitialized"');
|
||||
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.types.constructor, Array, 'should be an array');
|
||||
assert_true(Object.isFrozen(event.dataTransfer.types), 'should be frozen');
|
||||
}, 'types should be a frozen array');
|
||||
|
||||
test(function() {
|
||||
assert_false('contains' in event.dataTransfer.types);
|
||||
assert_false('item' in event.dataTransfer.types);
|
||||
}, 'types should not have any of the historical methods');
|
||||
|
||||
test(function() {
|
||||
assert_equals(event.dataTransfer.types, event.dataTransfer.types);
|
||||
}, 'types should return the same object from multiple reads (assuming no changes)');
|
||||
|
||||
test(function() {
|
||||
var before = event.dataTransfer.types;
|
||||
event.dataTransfer.clearData();
|
||||
assert_not_equals(event.dataTransfer.types, before);
|
||||
}, 'types should return a different object after changes');
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Focus fixup rule one (no <dialog>s involved)</title>
|
||||
<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule-one">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<div>
|
||||
<button id="button1">Button 1</button>
|
||||
<button id="button2">Button 2</button>
|
||||
<button id="button3">Button 3</button>
|
||||
<div id="div" tabindex="0">Div</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
async_test(t => {
|
||||
const button = document.querySelector("#button1");
|
||||
button.focus();
|
||||
|
||||
assert_equals(document.activeElement, button, "Sanity check: the button must start focused");
|
||||
|
||||
button.disabled = true;
|
||||
|
||||
assert_not_equals(document.activeElement, button, "After disabling, the button must no longer be focused");
|
||||
assert_equals(document.activeElement, document.body, "After disabling, the body must be focused");
|
||||
|
||||
}, "Disabling the active element (making it expressly inert)");
|
||||
|
||||
test(() => {
|
||||
const button = document.querySelector("#button2");
|
||||
button.focus();
|
||||
|
||||
assert_equals(document.activeElement, button, "Sanity check: the button must start focused");
|
||||
|
||||
button.hidden = true;
|
||||
|
||||
assert_not_equals(document.activeElement, button, "After hiding, the button must no longer be focused");
|
||||
assert_equals(document.activeElement, document.body, "After hiding, the body must be focused");
|
||||
|
||||
}, "Hiding the active element");
|
||||
|
||||
test(() => {
|
||||
const button = document.querySelector("#button3");
|
||||
button.focus();
|
||||
|
||||
assert_equals(document.activeElement, button, "Sanity check: the button must start focused");
|
||||
|
||||
button.remove();
|
||||
|
||||
assert_not_equals(document.activeElement, button, "After removing, the button must no longer be focused");
|
||||
assert_equals(document.activeElement, document.body, "After removing, the body must be focused");
|
||||
|
||||
}, "Removing the active element from the DOM");
|
||||
|
||||
test(() => {
|
||||
const div = document.querySelector("#div");
|
||||
div.focus();
|
||||
|
||||
assert_equals(document.activeElement, div, "Sanity check: the div must start focused");
|
||||
|
||||
div.removeAttribute("tabindex");
|
||||
|
||||
assert_not_equals(document.activeElement, div, "After removing tabindex, the div must no longer be focused");
|
||||
assert_equals(document.activeElement, document.body, "After removing tabindex, the body must be focused");
|
||||
|
||||
}, "Removing the tabindex attribute from a div");
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue