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

Unified Diff: third_party/WebKit/LayoutTests/custom-elements/spec/define-element.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
diff --git a/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html b/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
index 2c8d64587e2c38351ce0b7ca8de3da3e59c7f6d0..a61859e8d0aafdae8b5080dd67b8a1538fbed351 100644
--- a/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
+++ b/third_party/WebKit/LayoutTests/custom-elements/spec/define-element.html
@@ -355,19 +355,21 @@ test_with_window((w) => {
element.setAttribute('a', '1');
element.setAttribute('b', '2');
element.setAttribute('c', '3');
- let constructor = function () {};
- constructor.prototype.attributeChangedCallback = function () {
- invocations.push(arguments[0]);
+ let constructor = function () {
+ return Reflect.construct(w.HTMLElement, [], constructor);
+ };
+ constructor.prototype.attributeChangedCallback = function () {
+ invocations.push(arguments[0]);
};
constructor.observedAttributes = {[Symbol.iterator]:
- function* () {
+ function* () {
yield 'a';
- yield 'c';
+ yield 'c';
}
};
w.customElements.define('a-a', constructor);
w.document.body.appendChild(element);
- assert_array_equals(invocations, ['a', 'c'], 'attributeChangedCallback should be invoked twice for "a" and "c"');
+ assert_array_equals(invocations, ['a', 'c'], 'attributeChangedCallback should be invoked twice: once for "a" and once for "c"');
}, 'ObservedAttributes are retrieved from iterators');
test_with_window((w) => {
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698