mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Update web-platform-tests to revision 3137d1d2d7757366a69f8a449b458b5057e0e81e
This commit is contained in:
parent
81ca858678
commit
d6ba94ca28
2339 changed files with 89274 additions and 9328 deletions
|
@ -2,7 +2,7 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross-domain canvas data must not populate the dataTransfer</title>
|
||||
<script src="../../resources/crossorigin.js"></script>
|
||||
<script src="../../resources/crossorigin.sub.js"></script>
|
||||
<style type="text/css">
|
||||
div {
|
||||
width:105px;
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<title>drag & drop - cross-domain cross-document data drop</title>
|
||||
<script src="../resources/crossorigin.js"></script>
|
||||
<script src="../resources/crossorigin.sub.js"></script>
|
||||
<style>
|
||||
body > div {
|
||||
height: 200px;
|
|
@ -2,7 +2,7 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Cross-domain image data must not populate the dataTransfer</title>
|
||||
<script src="../../resources/crossorigin.js"></script>
|
||||
<script src="../../resources/crossorigin.sub.js"></script>
|
||||
<style type="text/css">
|
||||
div {
|
||||
width:105px;
|
|
@ -3,6 +3,7 @@
|
|||
<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">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/forms.html#attr-fieldset-disabled">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
|
@ -10,13 +11,16 @@
|
|||
<button id="button1">Button 1</button>
|
||||
<button id="button2">Button 2</button>
|
||||
<button id="button3">Button 3</button>
|
||||
<fieldset id="fieldset1"><button id="button4">Button 4</button></fieldset>
|
||||
<fieldset id="fieldset2" disabled><legend><button id="button5">Button 5</button></legend></fieldset>
|
||||
<div id="div" tabindex="0">Div</div>
|
||||
<div id="editable" contenteditable=true>editor</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
async_test(t => {
|
||||
test(() => {
|
||||
const button = document.querySelector("#button1");
|
||||
button.focus();
|
||||
|
||||
|
@ -55,6 +59,30 @@ test(() => {
|
|||
|
||||
}, "Removing the active element from the DOM");
|
||||
|
||||
test(() => {
|
||||
const fieldset = document.querySelector("#fieldset1");
|
||||
const button = document.querySelector("#button4");
|
||||
button.focus();
|
||||
assert_equals(document.activeElement, button, "Sanity check: the button must start focused");
|
||||
|
||||
fieldset.disabled = true;
|
||||
|
||||
assert_not_equals(document.activeElement, button, "After disabling ancestor fieldset, the button must no longer be focused");
|
||||
assert_equals(document.activeElement, document.body, "After disabling ancestor fieldset, the body must be focused");
|
||||
}, "Disabling <fieldset> affects its descendants");
|
||||
|
||||
test(() => {
|
||||
const fieldset = document.querySelector("#fieldset2");
|
||||
const button = document.querySelector("#button5");
|
||||
button.focus();
|
||||
assert_equals(document.activeElement, button, "Sanity check: the button must start focused");
|
||||
|
||||
fieldset.insertBefore(document.createElement("legend"), fieldset.firstChild);
|
||||
|
||||
assert_not_equals(document.activeElement, button, "After changing a legend element, the button must no longer be focused");
|
||||
assert_equals(document.activeElement, document.body, "After changing a legend element, the body must be focused");
|
||||
}, "Changing the first legend element in disabled <fieldset>");
|
||||
|
||||
test(() => {
|
||||
const div = document.querySelector("#div");
|
||||
div.focus();
|
||||
|
@ -68,4 +96,14 @@ test(() => {
|
|||
|
||||
}, "Removing the tabindex attribute from a div");
|
||||
|
||||
test(() => {
|
||||
const div = document.querySelector("#editable");
|
||||
div.focus();
|
||||
assert_equals(document.activeElement, div, "Sanity check: the div must start focused");
|
||||
|
||||
div.contentEditable = false;
|
||||
|
||||
assert_not_equals(document.activeElement, div, "After disabling contentEditable, the div must no longer be focused");
|
||||
assert_equals(document.activeElement, document.body, "After disabling contentEditable, the body must be focused");
|
||||
}, "Disabling contenteditable");
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue