mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Auto merge of #22642 - servo-wpt-sync:wpt_update_06-01-2019, r=jdm
Sync WPT with upstream (06-01-2019) Automated downstream sync of changes from upstream as of 06-01-2019. [no-wpt-sync] <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22642) <!-- Reviewable:end -->
This commit is contained in:
commit
e09e683718
18 changed files with 317 additions and 52 deletions
|
@ -158046,7 +158046,7 @@
|
||||||
"/css/css-values/vh-support-atviewport.html",
|
"/css/css-values/vh-support-atviewport.html",
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
"/css/css-values/reference/all-green.html",
|
"/css/css-values/reference/vh-support-atviewport-ref.htm",
|
||||||
"=="
|
"=="
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -275214,6 +275214,11 @@
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
"css/css-values/reference/vh-support-atviewport-ref.htm": [
|
||||||
|
[
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
"css/css-values/reference/vh_not_refreshing_on_chrome-ref.html": [
|
"css/css-values/reference/vh_not_refreshing_on_chrome-ref.html": [
|
||||||
[
|
[
|
||||||
{}
|
{}
|
||||||
|
@ -353391,6 +353396,12 @@
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
"custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html": [
|
||||||
|
[
|
||||||
|
"/custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
"custom-elements/historical.html": [
|
"custom-elements/historical.html": [
|
||||||
[
|
[
|
||||||
"/custom-elements/historical.html",
|
"/custom-elements/historical.html",
|
||||||
|
@ -586988,6 +586999,10 @@
|
||||||
"962a748d2c059b45fca4d7788b04b77c61e0b923",
|
"962a748d2c059b45fca4d7788b04b77c61e0b923",
|
||||||
"support"
|
"support"
|
||||||
],
|
],
|
||||||
|
"css/css-values/reference/vh-support-atviewport-ref.htm": [
|
||||||
|
"cfa9e8d02d48436ee1c311da7c7bd65b0f4291cf",
|
||||||
|
"support"
|
||||||
|
],
|
||||||
"css/css-values/reference/vh_not_refreshing_on_chrome-ref.html": [
|
"css/css-values/reference/vh_not_refreshing_on_chrome-ref.html": [
|
||||||
"279d1c69b9f7fbe60edb55b7e8a5d507eda24936",
|
"279d1c69b9f7fbe60edb55b7e8a5d507eda24936",
|
||||||
"support"
|
"support"
|
||||||
|
@ -587225,7 +587240,7 @@
|
||||||
"reftest"
|
"reftest"
|
||||||
],
|
],
|
||||||
"css/css-values/vh-support-atviewport.html": [
|
"css/css-values/vh-support-atviewport.html": [
|
||||||
"c79ace6df18a7432dba34fa83cdb1af183206156",
|
"c1999c4a22e2933259b3f77193c2b20c3b53f199",
|
||||||
"reftest"
|
"reftest"
|
||||||
],
|
],
|
||||||
"css/css-values/vh-support-margin.html": [
|
"css/css-values/vh-support-margin.html": [
|
||||||
|
@ -608036,6 +608051,10 @@
|
||||||
"7f5a4d0f8e76d495acfdedfe172ef5acfdac75b4",
|
"7f5a4d0f8e76d495acfdedfe172ef5acfdac75b4",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
|
"custom-elements/enqueue-custom-element-callback-reactions-inside-another-callback.html": [
|
||||||
|
"2fd932f29a3bae3e80ee90a1996c1d25ea7934cf",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
"custom-elements/historical.html": [
|
"custom-elements/historical.html": [
|
||||||
"70981ce59c41dd352bccf1b70a1cb7c8cecf30ec",
|
"70981ce59c41dd352bccf1b70a1cb7c8cecf30ec",
|
||||||
"testharness"
|
"testharness"
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
[vh-support-atviewport.html]
|
||||||
|
expected: FAIL
|
|
@ -0,0 +1,7 @@
|
||||||
|
[enqueue-custom-element-callback-reactions-inside-another-callback.html]
|
||||||
|
[Connecting an element without connectedCallback while it has a disconnectedCallback in its custom element reaction queue must not result in disconnectedCallback getting invoked before the insertion completes]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Connecting a element with connectedCallback while it has a disconnectedCallback in its custom element reaction queue must result in disconnectedCallback getting invoked before the insertion completes]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
type: testharness
|
type: testharness
|
||||||
|
|
||||||
[single-byte-decoder.html?document]
|
[single-byte-decoder.html?document]
|
||||||
expected: TIMEOUT
|
expected: CRASH
|
||||||
[ISO-8859-4: iso_8859-4:1988 (document.characterSet and document.inputEncoding)]
|
[ISO-8859-4: iso_8859-4:1988 (document.characterSet and document.inputEncoding)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
|
|
||||||
[single-byte-decoder.html?XMLHttpRequest]
|
[single-byte-decoder.html?XMLHttpRequest]
|
||||||
expected: CRASH
|
expected: TIMEOUT
|
||||||
[ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)]
|
[ISO-8859-2: iso_8859-2:1987 (XMLHttpRequest)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -141,8 +141,5 @@
|
||||||
[windows-1254: cp1254 (XMLHttpRequest)]
|
[windows-1254: cp1254 (XMLHttpRequest)]
|
||||||
expected: TIMEOUT
|
expected: TIMEOUT
|
||||||
|
|
||||||
[windows-1253: cp1253 (XMLHttpRequest)]
|
|
||||||
expected: TIMEOUT
|
|
||||||
|
|
||||||
|
|
||||||
[single-byte-decoder.html?TextDecoder]
|
[single-byte-decoder.html?TextDecoder]
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[traverse_the_history_1.html]
|
|
||||||
[Multiple history traversals from the same task]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[traverse_the_history_2.html]
|
|
||||||
[Multiple history traversals, last would be aborted]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[traverse_the_history_4.html]
|
|
||||||
[Multiple history traversals, last would be aborted]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -11,5 +11,5 @@
|
||||||
expected: TIMEOUT
|
expected: TIMEOUT
|
||||||
|
|
||||||
[picture: source (max-width:500px) valid image, img valid image, resize to narrow]
|
[picture: source (max-width:500px) valid image, img valid image, resize to narrow]
|
||||||
expected: TIMEOUT
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
[toggleEvent.html]
|
||||||
|
[Calling open twice on 'details' fires only one toggle event]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[Setting open=true to opened 'details' element should not fire a toggle event at the 'details' element]
|
||||||
|
expected: FAIL
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[aborted-parser.window.html]
|
|
||||||
[document.open() after parser is aborted]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
[promise-rejection-events.html]
|
||||||
|
expected: TIMEOUT
|
||||||
|
[rejectionhandled is dispatched from a queued task, and not immediately]
|
||||||
|
expected: TIMEOUT
|
||||||
|
|
|
@ -12,3 +12,6 @@
|
||||||
[Verifies the resolution of entry.startTime is at least 5 microseconds.]
|
[Verifies the resolution of entry.startTime is at least 5 microseconds.]
|
||||||
expected: TIMEOUT
|
expected: TIMEOUT
|
||||||
|
|
||||||
|
[Verifies the resolution of performance.now() is at least 5 microseconds.]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[buffer-full-store-and-clear-during-callback.html]
|
[buffer-full-store-and-clear-during-callback.html]
|
||||||
expected: TIMEOUT
|
expected: ERROR
|
||||||
[Test that entries overflowing the buffer trigger the buffer full event, can be stored, and find themselves in the primary buffer after it's cleared.]
|
[Test that entries overflowing the buffer trigger the buffer full event, can be stored, and find themselves in the primary buffer after it's cleared.]
|
||||||
expected: TIMEOUT
|
expected: TIMEOUT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
[realtimeanalyser-fft-scaling.html]
|
[realtimeanalyser-fft-scaling.html]
|
||||||
|
expected: TIMEOUT
|
||||||
[X 2048-point FFT peak position is not equal to 64. Got 0.]
|
[X 2048-point FFT peak position is not equal to 64. Got 0.]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
[transition_calc_implicit.html]
|
|
||||||
expected: TIMEOUT
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html><head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>
|
||||||
|
CSS Reftest Reference
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<link href="mailto:fremycompany.developer@yahoo.fr" rel="author" title="François REMY">
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
html
|
||||||
|
{
|
||||||
|
background-color: yellow;
|
||||||
|
border-left: blue solid 50vw;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body></html>
|
|
@ -1,44 +1,41 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html><head>
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>
|
<title>
|
||||||
CSS Values and Units Test:
|
CSS Values and Units Test:
|
||||||
Viewports units are supported in @viewport rules
|
Viewports units are supported in @viewport rules
|
||||||
</title>
|
</title>
|
||||||
<meta name="assert" content="
|
<meta content="
|
||||||
Viewports units are supported in @viewport rules
|
Viewports units are supported in @viewport rules
|
||||||
" />
|
" name="assert">
|
||||||
|
|
||||||
<link
|
<link href="mailto:fremycompany.developer@yahoo.fr" rel="author" title="François REMY">
|
||||||
rel="author"
|
|
||||||
title="François REMY"
|
|
||||||
href="mailto:fremycompany.developer@yahoo.fr"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<link rel="help" href="http://www.w3.org/TR/css3-values/#viewport-relative-lengths" />
|
<link href="http://www.w3.org/TR/css3-values/#viewport-relative-lengths" rel="help">
|
||||||
<link rel="help" href="https://drafts.csswg.org/css-device-adapt-1/" />
|
<link href="https://drafts.csswg.org/css-device-adapt-1/#atviewport-rule" rel="help">
|
||||||
|
|
||||||
<link
|
<link href="reference/vh-support-atviewport-ref.htm" rel="match">
|
||||||
rel="match"
|
|
||||||
href="reference/all-green.html"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
html
|
||||||
|
{
|
||||||
|
background-color: yellow;
|
||||||
|
}
|
||||||
|
|
||||||
html, body { margin: 0px; padding: 0px; overflow: hidden; }
|
body
|
||||||
|
{
|
||||||
@viewport { width: 1vw; }
|
background-color: blue;
|
||||||
|
height: 100vh;
|
||||||
html { background: red; }
|
margin: 0;
|
||||||
#target { background: green; width: 100vw; height: 100vh; }
|
}
|
||||||
|
|
||||||
|
@viewport
|
||||||
|
{
|
||||||
|
width: 50vw;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="target"></div>
|
</body></html>
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1,223 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Custom Elements: must enqueue an element on the appropriate element queue after checking callback is null and the attribute name</title>
|
||||||
|
<meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org">
|
||||||
|
<meta name="assert" content="To enqueue a custom element callback reaction, the callback must be checked of being null and whether the attribute name is observed or not">
|
||||||
|
<link rel="help" content="https://html.spec.whatwg.org/multipage/custom-elements.html#enqueue-a-custom-element-callback-reaction">
|
||||||
|
<link rel="help" content="https://github.com/w3c/webcomponents/issues/760">
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script src="resources/custom-elements-helpers.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
test_with_window((contentWindow, contentDocument) => {
|
||||||
|
class ParentElement extends contentWindow.HTMLElement {
|
||||||
|
connectedCallback()
|
||||||
|
{
|
||||||
|
logs.push('begin');
|
||||||
|
const child = this.firstChild;
|
||||||
|
child.remove();
|
||||||
|
logs.push('end');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('parent-element', ParentElement);
|
||||||
|
|
||||||
|
const logs = [];
|
||||||
|
class ChildElement extends contentWindow.HTMLElement {
|
||||||
|
connectedCallback() { logs.push('connected'); }
|
||||||
|
disconnectedCallback() { logs.push('disconnected'); }
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('child-element', ChildElement);
|
||||||
|
|
||||||
|
const parent = new ParentElement;
|
||||||
|
const child = new ChildElement;
|
||||||
|
parent.appendChild(child);
|
||||||
|
|
||||||
|
contentDocument.body.appendChild(parent);
|
||||||
|
assert_array_equals(logs, ['begin', 'connected', 'disconnected', 'end']);
|
||||||
|
}, 'Disconnecting an element with disconnectedCallback while it has a connectedCallback in its custom element reaction queue must result in connectedCallback getting invoked before the removal completes');
|
||||||
|
|
||||||
|
test_with_window((contentWindow, contentDocument) => {
|
||||||
|
class ParentElement extends contentWindow.HTMLElement {
|
||||||
|
connectedCallback()
|
||||||
|
{
|
||||||
|
logs.push('begin');
|
||||||
|
const child = this.firstChild;
|
||||||
|
child.remove();
|
||||||
|
logs.push('end');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('parent-element', ParentElement);
|
||||||
|
|
||||||
|
const logs = [];
|
||||||
|
class ChildElement extends contentWindow.HTMLElement {
|
||||||
|
connectedCallback() { logs.push('connected'); }
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('child-element', ChildElement);
|
||||||
|
|
||||||
|
const parent = new ParentElement;
|
||||||
|
const child = new ChildElement;
|
||||||
|
parent.appendChild(child);
|
||||||
|
|
||||||
|
contentDocument.body.appendChild(parent);
|
||||||
|
assert_array_equals(logs, ['begin', 'end', 'connected']);
|
||||||
|
}, 'Disconnecting an element without disconnectedCallback while it has a connectedCallback in its custom element reaction queue must not result in connectedCallback getting invoked before the removal completes');
|
||||||
|
|
||||||
|
test_with_window((contentWindow, contentDocument) => {
|
||||||
|
class ParentElement extends contentWindow.HTMLElement {
|
||||||
|
disconnectedCallback()
|
||||||
|
{
|
||||||
|
logs.push('begin');
|
||||||
|
contentDocument.body.appendChild(this.firstChild);
|
||||||
|
logs.push('end');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('parent-element', ParentElement);
|
||||||
|
|
||||||
|
const logs = [];
|
||||||
|
class ChildElement extends contentWindow.HTMLElement {
|
||||||
|
connectedCallback() { logs.push('connected'); }
|
||||||
|
disconnectedCallback() { logs.push('disconnected'); }
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('child-element', ChildElement);
|
||||||
|
|
||||||
|
const parent = new ParentElement;
|
||||||
|
const child = new ChildElement;
|
||||||
|
parent.appendChild(child);
|
||||||
|
contentDocument.body.appendChild(parent);
|
||||||
|
parent.remove();
|
||||||
|
assert_array_equals(logs, ['connected', 'begin', 'disconnected', 'connected', 'end']);
|
||||||
|
}, 'Connecting a element with connectedCallback while it has a disconnectedCallback in its custom element reaction queue must result in disconnectedCallback getting invoked before the insertion completes');
|
||||||
|
|
||||||
|
test_with_window((contentWindow, contentDocument) => {
|
||||||
|
class ParentElement extends contentWindow.HTMLElement {
|
||||||
|
disconnectedCallback()
|
||||||
|
{
|
||||||
|
logs.push('begin');
|
||||||
|
contentDocument.body.appendChild(this.firstChild);
|
||||||
|
logs.push('end');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('parent-element', ParentElement);
|
||||||
|
|
||||||
|
const logs = [];
|
||||||
|
class ChildElement extends contentWindow.HTMLElement {
|
||||||
|
disconnectedCallback() { logs.push('disconnected'); }
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('child-element', ChildElement);
|
||||||
|
|
||||||
|
const parent = new ParentElement;
|
||||||
|
const child = new ChildElement;
|
||||||
|
parent.appendChild(child);
|
||||||
|
contentDocument.body.appendChild(parent);
|
||||||
|
parent.remove();
|
||||||
|
assert_array_equals(logs, ['begin', 'end', 'disconnected']);
|
||||||
|
}, 'Connecting an element without connectedCallback while it has a disconnectedCallback in its custom element reaction queue must not result in disconnectedCallback getting invoked before the insertion completes');
|
||||||
|
|
||||||
|
test_with_window((contentWindow, contentDocument) => {
|
||||||
|
class ParentElement extends contentWindow.HTMLElement {
|
||||||
|
connectedCallback()
|
||||||
|
{
|
||||||
|
logs.push('begin');
|
||||||
|
document.adoptNode(this.firstChild);
|
||||||
|
logs.push('end');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('parent-element', ParentElement);
|
||||||
|
|
||||||
|
const logs = [];
|
||||||
|
class ChildElement extends contentWindow.HTMLElement {
|
||||||
|
adoptedCallback() { logs.push('adopted'); }
|
||||||
|
connectedCallback() { logs.push('connected'); }
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('child-element', ChildElement);
|
||||||
|
|
||||||
|
const parent = new ParentElement;
|
||||||
|
const child = new ChildElement;
|
||||||
|
parent.appendChild(child);
|
||||||
|
contentDocument.body.appendChild(parent);
|
||||||
|
assert_array_equals(logs, ['begin', 'connected', 'adopted', 'end']);
|
||||||
|
}, 'Adopting an element with adoptingCallback while it has a connectedCallback in its custom element reaction queue must result in connectedCallback getting invoked before the adoption completes');
|
||||||
|
|
||||||
|
test_with_window((contentWindow, contentDocument) => {
|
||||||
|
class ParentElement extends contentWindow.HTMLElement {
|
||||||
|
connectedCallback()
|
||||||
|
{
|
||||||
|
logs.push('begin');
|
||||||
|
document.adoptNode(this.firstChild);
|
||||||
|
logs.push('end');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('parent-element', ParentElement);
|
||||||
|
|
||||||
|
const logs = [];
|
||||||
|
class ChildElement extends contentWindow.HTMLElement {
|
||||||
|
connectedCallback() { logs.push('connected'); }
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('child-element', ChildElement);
|
||||||
|
|
||||||
|
const parent = new ParentElement;
|
||||||
|
const child = new ChildElement;
|
||||||
|
parent.appendChild(child);
|
||||||
|
contentDocument.body.appendChild(parent);
|
||||||
|
assert_array_equals(logs, ['begin', 'end', 'connected']);
|
||||||
|
}, 'Adopting an element without adoptingCallback while it has a connectedCallback in its custom element reaction queue must not result in connectedCallback getting invoked before the adoption completes');
|
||||||
|
|
||||||
|
test_with_window((contentWindow, contentDocument) => {
|
||||||
|
class ParentElement extends contentWindow.HTMLElement {
|
||||||
|
connectedCallback()
|
||||||
|
{
|
||||||
|
logs.push('begin');
|
||||||
|
this.firstChild.setAttribute('title', 'foo');
|
||||||
|
logs.push('end');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('parent-element', ParentElement);
|
||||||
|
|
||||||
|
const logs = [];
|
||||||
|
class ChildElement extends contentWindow.HTMLElement {
|
||||||
|
attributeChangedCallback() { logs.push('attributeChanged'); }
|
||||||
|
connectedCallback() { logs.push('connected'); }
|
||||||
|
static get observedAttributes() { return ['title']; }
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('child-element', ChildElement);
|
||||||
|
|
||||||
|
const parent = new ParentElement;
|
||||||
|
const child = new ChildElement;
|
||||||
|
parent.appendChild(child);
|
||||||
|
contentDocument.body.appendChild(parent);
|
||||||
|
assert_array_equals(logs, ['begin', 'connected', 'attributeChanged', 'end']);
|
||||||
|
}, 'Setting an observed attribute on an element with attributeChangedCallback while it has a connectedCallback in its custom element reaction queue must result in connectedCallback getting invoked before the attribute change completes');
|
||||||
|
|
||||||
|
test_with_window((contentWindow, contentDocument) => {
|
||||||
|
class ParentElement extends contentWindow.HTMLElement {
|
||||||
|
connectedCallback()
|
||||||
|
{
|
||||||
|
logs.push('begin');
|
||||||
|
this.firstChild.setAttribute('lang', 'en');
|
||||||
|
logs.push('end');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('parent-element', ParentElement);
|
||||||
|
|
||||||
|
const logs = [];
|
||||||
|
class ChildElement extends contentWindow.HTMLElement {
|
||||||
|
attributeChangedCallback() { logs.push('attributeChanged'); }
|
||||||
|
connectedCallback() { logs.push('connected'); }
|
||||||
|
static get observedAttributes() { return ['title']; }
|
||||||
|
}
|
||||||
|
contentWindow.customElements.define('child-element', ChildElement);
|
||||||
|
|
||||||
|
const parent = new ParentElement;
|
||||||
|
const child = new ChildElement;
|
||||||
|
parent.appendChild(child);
|
||||||
|
contentDocument.body.appendChild(parent);
|
||||||
|
assert_array_equals(logs, ['begin', 'end', 'connected']);
|
||||||
|
}, 'Setting an observed attribute on an element with attributeChangedCallback while it has a connectedCallback in its custom element reaction queue must not result in connectedCallback getting invoked before the attribute change completes');
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Add table
Add a link
Reference in a new issue