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

Side by Side Diff: tests/html/utils.dart

Issue 33593003: Reapply remove upgradeCustomElement methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library TestUtils; 1 library TestUtils;
2 2
3 import 'dart:async'; 3 import 'dart:async';
4 import 'dart:html'; 4 import 'dart:html';
5 import 'dart:js' as js;
5 import 'dart:typed_data'; 6 import 'dart:typed_data';
6 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
7 8
8 /** 9 /**
9 * Verifies that [actual] has the same graph structure as [expected]. 10 * Verifies that [actual] has the same graph structure as [expected].
10 * Detects cycles and DAG structure in Maps and Lists. 11 * Detects cycles and DAG structure in Maps and Lists.
11 */ 12 */
12 verifyGraph(expected, actual) { 13 verifyGraph(expected, actual) {
13 var eItems = []; 14 var eItems = [];
14 var aItems = []; 15 var aItems = [];
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 ..src = '/packages/custom_element/custom-elements.debug.js'; 167 ..src = '/packages/custom_element/custom-elements.debug.js';
167 document.head.append(script); 168 document.head.append(script);
168 return document.body.on['WebComponentsReady'].first; 169 return document.body.on['WebComponentsReady'].first;
169 } 170 }
170 return new Future.value(); 171 return new Future.value();
171 } 172 }
172 173
173 Future loadPolyfills() { 174 Future loadPolyfills() {
174 return loadCustomElementPolyfill(); 175 return loadCustomElementPolyfill();
175 } 176 }
177
178 /**
179 * Upgrade all custom elements in the subtree which have not been upgraded.
180 *
181 * This is needed to cover timing scenarios which the custom element polyfill
182 * does not cover.
183 */
184 void upgradeCustomElements(Node node) {
185 if (js.context.hasProperty('CustomElements') &&
186 js.context['CustomElements'].hasProperty('upgradeAll')) {
187 js.context['CustomElements'].callMethod('upgradeAll', [node]);
188 }
189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698