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

Unified Diff: third_party/WebKit/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js

Issue 2170383002: CustomElements: adopt node (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adoptedCallback should be enqueued when doc is different from oldDocument Created 4 years, 5 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/resources/custom-elements-helpers.js
diff --git a/third_party/WebKit/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js b/third_party/WebKit/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js
index c4a9e6c5ad706f69b376873bdf97bd5e735f8ef4..0806c214a43e1cc86db7bb399d57392052517ccc 100644
--- a/third_party/WebKit/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js
+++ b/third_party/WebKit/LayoutTests/custom-elements/spec/resources/custom-elements-helpers.js
@@ -32,4 +32,14 @@ function assert_throws_dom_exception(global_context, code, func, description) {
}
}, description);
assert_true(exception instanceof global_context.DOMException, 'DOMException on the appropriate window');
-}
+}
+
+function assert_array_equals_callback_invocations(actual, expected, description) {
dominicc (has gone to gerrit) 2016/07/25 07:56:14 Maybe don't put 'array_equals' in the name of this
+ assert_equals(actual.length, expected.length);
+ for (let len=actual.length, i=0; i<len; ++i) {
+ let callback = expected[i][0];
+ assert_equals(actual[i][0], expected[i][0], callback + ' callback should be invoked');
+ assert_equals(actual[i][1], expected[i][1], callback + ' should be invoked on the element ' + expected[i][1]);
+ assert_array_equals(actual[i][2], expected[i][2], callback + ' should be invoked with the arguments ' + expected[i][2]);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698