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

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

Issue 2200613002: The HTML parser synchronously creates custom elements (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Eliminate redundant TODOs. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 function create_window_in_test(t, srcdoc) { 1 function create_window_in_test(t, srcdoc) {
2 let p = new Promise((resolve) => { 2 let p = new Promise((resolve) => {
3 let f = document.createElement('iframe'); 3 let f = document.createElement('iframe');
4 f.srcdoc = srcdoc ? srcdoc : ''; 4 f.srcdoc = srcdoc ? srcdoc : '';
5 f.onload = (event) => { 5 f.onload = (event) => {
6 let w = f.contentWindow; 6 let w = f.contentWindow;
7 t.add_cleanup(() => f.remove()); 7 t.add_cleanup(() => f.parentNode && f.remove());
8 resolve(w); 8 resolve(w);
9 }; 9 };
10 document.body.appendChild(f); 10 document.body.appendChild(f);
11 }); 11 });
12 return p; 12 return p;
13 } 13 }
14 14
15 function test_with_window(f, name, srcdoc) { 15 function test_with_window(f, name, srcdoc) {
16 promise_test((t) => { 16 promise_test((t) => {
17 return create_window_in_test(t, srcdoc) 17 return create_window_in_test(t, srcdoc)
(...skipping 18 matching lines...) Expand all
36 36
37 function assert_array_equals_callback_invocations(actual, expected, description) { 37 function assert_array_equals_callback_invocations(actual, expected, description) {
38 assert_equals(actual.length, expected.length); 38 assert_equals(actual.length, expected.length);
39 for (let len=actual.length, i=0; i<len; ++i) { 39 for (let len=actual.length, i=0; i<len; ++i) {
40 let callback = expected[i][0]; 40 let callback = expected[i][0];
41 assert_equals(actual[i][0], expected[i][0], callback + ' callback should be invoked'); 41 assert_equals(actual[i][0], expected[i][0], callback + ' callback should be invoked');
42 assert_equals(actual[i][1], expected[i][1], callback + ' should be invoked o n the element ' + expected[i][1]); 42 assert_equals(actual[i][1], expected[i][1], callback + ' should be invoked o n the element ' + expected[i][1]);
43 assert_array_equals(actual[i][2], expected[i][2], callback + ' should be inv oked with the arguments ' + expected[i][2]); 43 assert_array_equals(actual[i][2], expected[i][2], callback + ' should be inv oked with the arguments ' + expected[i][2]);
44 } 44 }
45 } 45 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/custom-elements/spec/parsing.html ('k') | third_party/WebKit/Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698