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

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

Issue 2173623003: Add "Failed" custom element state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid multiple toElement 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-create.html » ('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/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..d5030f00c8392faac87038e21f1279360bf683ef 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
@@ -1,7 +1,7 @@
-function create_window_in_test(t) {
+function create_window_in_test(t, srcdoc) {
let p = new Promise((resolve) => {
let f = document.createElement('iframe');
- f.srcdoc = '';
+ f.srcdoc = srcdoc ? srcdoc : '';
f.onload = (event) => {
let w = f.contentWindow;
t.add_cleanup(() => f.remove());
@@ -12,9 +12,9 @@ function create_window_in_test(t) {
return p;
}
-function test_with_window(f, name) {
+function test_with_window(f, name, srcdoc) {
promise_test((t) => {
- return create_window_in_test(t)
+ return create_window_in_test(t, srcdoc)
.then((w) => {
f(w);
});
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/custom-elements/spec/state-failed-create.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698