Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1028)

Unified Diff: third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html

Issue 2456773002: Clear the custom element's reaction queue if upgrade fails. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html
diff --git a/third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html b/third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html
index fff117f7b99ae8ba6e90bcedcaa0faa57e1e16cf..13aaf99294837a2c621ba6d878ab020cdb34091e 100644
--- a/third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html
+++ b/third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-upgrade.html
@@ -13,16 +13,15 @@
test_with_window(w => {
let document = w.document;
let element = document.createElement('a-a');
+ let error = new Error('expected');
let constructorCount = 0;
w.customElements.define('a-a', class extends w.HTMLElement {
constructor() {
constructorCount++;
- throw new Error();
+ throw error;
}
connectedCallback() {
- // TODO(davaajav): remove the failure expectation when this issue is closed
- // https://github.com/w3c/webcomponents/issues/563
assert_unreached('connectedCallback should not be invoked if constructor threw');
}
});
@@ -32,7 +31,7 @@ test_with_window(w => {
// Set element's custom element state to "failed".
// https://html.spec.whatwg.org/multipage/scripting.html#upgrades
let container = document.body;
- container.appendChild(element);
+ assert_reports(w, error, () => container.appendChild(element));
assert_equals(constructorCount, 1, 'constructor should be invoked once');
// "failed" is not "defined"

Powered by Google App Engine
This is Rietveld 408576698