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

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

Issue 2477133002: Import wpt@306326cfe973b6c7019c50879ad03b02825c7539 (Closed)
Patch Set: Modify TestExpectations or download new baselines for tests. Created 4 years, 1 month 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.parentNode && 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);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 function create_disconnected_callback_log(element) { 73 function create_disconnected_callback_log(element) {
74 return {type: 'disconnected', element: element}; 74 return {type: 'disconnected', element: element};
75 } 75 }
76 76
77 function assert_disconnected_log_entry(log, element) { 77 function assert_disconnected_log_entry(log, element) {
78 assert_equals(log.type, 'disconnected'); 78 assert_equals(log.type, 'disconnected');
79 assert_equals(log.element, element); 79 assert_equals(log.element, element);
80 } 80 }
81 81
82 function assert_adopted_log_entry(log, element) {
83 assert_equals(log.type, 'adopted');
84 assert_equals(log.element, element);
85 }
86
87 function create_adopted_callback_log(element) {
88 return {type: 'adopted', element: element};
89 }
90
82 function create_attribute_changed_callback_log(element, name, oldValue, newValue , namespace) { 91 function create_attribute_changed_callback_log(element, name, oldValue, newValue , namespace) {
83 return { 92 return {
84 type: 'attributeChanged', 93 type: 'attributeChanged',
85 element: element, 94 element: element,
86 name: name, 95 name: name,
87 namespace: namespace, 96 namespace: namespace,
88 oldValue: oldValue, 97 oldValue: oldValue,
89 newValue: newValue, 98 newValue: newValue,
90 actualValue: element.getAttributeNS(namespace, name) 99 actualValue: element.getAttributeNS(namespace, name)
91 }; 100 };
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 xhr.overrideMimeType('text/xml'); 221 xhr.overrideMimeType('text/xml');
213 xhr.onload = function () { resolve(xhr.responseXML); } 222 xhr.onload = function () { resolve(xhr.responseXML); }
214 xhr.onerror = function () { reject('Failed to fetch the docu ment'); } 223 xhr.onerror = function () { reject('Failed to fetch the docu ment'); }
215 xhr.send(); 224 xhr.send();
216 }); 225 });
217 }, 226 },
218 hasBrowsingContext: false, 227 hasBrowsingContext: false,
219 } 228 }
220 ]; 229 ];
221 } 230 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698