Commit 29cd6645 authored by blink-w3c-test-autoroller's avatar blink-w3c-test-autoroller Committed by Commit bot

Import wpt@009111410a1099e85d4027a679985975757ceb4d

Using update-w3c-deps in Chromium d0059913.

Build: https://build.chromium.org/p/chromium.infra.cron/builders/w3c-test-autoroller/builds/7835

TBR=qyearsley@chromium.org
NOEXPORT=true

Review-Url: https://codereview.chromium.org/2590903002
Cr-Commit-Position: refs/heads/master@{#439825}
parent e0bf6128
......@@ -1788,6 +1788,10 @@ crbug.com/490015 virtual/stable/http/tests/navigation/beacon-blob-with-non-simpl
crbug.com/490015 virtual/stable/http/tests/navigation/same-and-different-back.html [ Skip ]
# ====== New tests from w3c-test-autoroller added here ======
crbug.com/626703 [ Trusty Mac10.11 Mac10.10 Retina Win7 Win10 Mac10.9 ] imported/wpt/html/dom/reflection-embedded.html [ Failure ]
crbug.com/626703 [ Trusty Mac10.11 Mac10.10 Retina Win7 Win10 Mac10.9 ] imported/wpt/html/dom/reflection-metadata.html [ Failure ]
crbug.com/626703 [ Trusty Mac10.11 Mac10.10 Retina Win7 Win10 Mac10.9 ] imported/wpt/html/dom/reflection-misc.html [ Failure ]
crbug.com/626703 [ Trusty Mac10.11 Mac10.10 Retina Win7 Win10 Mac10.9 ] imported/wpt/html/dom/reflection-text.html [ Failure ]
crbug.com/626703 imported/wpt/clear-site-data/navigation.html [ Timeout ]
crbug.com/626703 imported/wpt/auxclick/auxclick_event-manual.html [ Timeout ]
crbug.com/626703 imported/wpt/pointerevents/pointerevent_boundary_events_in_capturing-manual.html [ Timeout ]
......
......@@ -16,7 +16,6 @@ async_test(t => {
document.onfullscreenchange = t.unreached_func("fullscreenchange event");
document.onfullscreenerror = t.step_func_done(() => {
assert_equals(document.fullscreenElement, null);
assert_equals(iframeDoc.fullscreenElement, null);
});
trusted_click(t.step_func(() => {
......
......@@ -10,6 +10,7 @@ var embeddedElements = {
isMap: "boolean",
width: {type: "unsigned long", customGetter: true},
height: {type: "unsigned long", customGetter: true},
referrerPolicy: {type: "enum", keywords: ["", "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "strict-origin", "origin-when-cross-origin", "strict-origin-when-cross-origin", "unsafe-url"]},
// Obsolete
name: "string",
......@@ -27,8 +28,11 @@ var embeddedElements = {
name: "string",
sandbox: "settable tokenlist",
allowFullscreen: "boolean",
allowUserMedia: "boolean",
allowPaymentRequest: "boolean",
width: "string",
height: "string",
referrerPolicy: {type: "enum", keywords: ["", "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "strict-origin", "origin-when-cross-origin", "strict-origin-when-cross-origin", "unsafe-url"]},
// Obsolete
align: "string",
......@@ -137,6 +141,7 @@ var embeddedElements = {
ping: "string",
rel: "string",
relList: {type: "tokenlist", domAttrName: "rel"},
referrerPolicy: {type: "enum", keywords: ["", "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "strict-origin", "origin-when-cross-origin", "strict-origin-when-cross-origin", "unsafe-url"]},
// HTMLHyperlinkElementUtils
href: "url",
......
......@@ -12,10 +12,14 @@ var metadataElements = {
crossOrigin: {type: "enum", keywords: ["anonymous", "use-credentials"], nonCanon:{"": "anonymous"}, isNullable: true, defaultVal: null, invalidVal: "anonymous"},
rel: "string",
relList: {type: "tokenlist", domAttrName: "rel"},
// as: {}, XXX TODO: reflecting IDL attribute is an IDL enumeration
media: "string",
nonce: "string",
integrity: "string",
hreflang: "string",
type: "string",
sizes: "settable tokenlist",
referrerPolicy: {type: "enum", keywords: ["", "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "strict-origin", "origin-when-cross-origin", "strict-origin-when-cross-origin", "unsafe-url"]},
// Obsolete
charset: "string",
......
......@@ -14,6 +14,8 @@ var miscElements = {
// TODO: async attribute (complicated).
defer: "boolean",
crossOrigin: {type: "enum", keywords: ["anonymous", "use-credentials"], nonCanon:{"": "anonymous"}, isNullable: true, defaultVal: null, invalidVal: "anonymous"},
nonce: "string",
integrity: "string",
},
noscript: {},
......
......@@ -9,6 +9,7 @@ var textElements = {
relList: {type: "tokenlist", domAttrName: "rel"},
hreflang: "string",
type: "string",
referrerPolicy: {type: "enum", keywords: ["", "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "strict-origin", "origin-when-cross-origin", "strict-origin-when-cross-origin", "unsafe-url"]},
// HTMLHyperlinkElementUtils
href: "url",
......
......@@ -2,6 +2,9 @@ This is a testharness.js-based test.
FAIL Disabling the active element (making it expressly inert) assert_not_equals: After disabling, the button must no longer be focused got disallowed value Element node <button id="button1" disabled="">Button 1</button>
FAIL Hiding the active element assert_not_equals: After hiding, the button must no longer be focused got disallowed value Element node <button id="button2" hidden="">Button 2</button>
PASS Removing the active element from the DOM
FAIL Disabling <fieldset> affects its descendants assert_not_equals: After disabling ancestor fieldset, the button must no longer be focused got disallowed value Element node <button id="button4">Button 4</button>
FAIL Changing the first legend element in disabled <fieldset> assert_not_equals: After changing a legend element, the button must no longer be focused got disallowed value Element node <button id="button5">Button 5</button>
FAIL Removing the tabindex attribute from a div assert_not_equals: After removing tabindex, the div must no longer be focused got disallowed value Element node <div id="div">Div</div>
FAIL Disabling contenteditable assert_not_equals: After disabling contentEditable, the div must no longer be focused got disallowed value Element node <div id="editable" contenteditable="false">editor</div>
Harness: the test ran to completion.
......@@ -3,6 +3,7 @@
<title>Focus fixup rule one (no &lt;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>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment