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

Side by Side Diff: tests/html/custom/created_callback_test.dart

Issue 158083002: introduce web_components pkg for consolidated polyfills (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library created_callback_test; 5 library created_callback_test;
6 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 import 'package:unittest/html_config.dart'; 7 import 'package:unittest/html_config.dart';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'dart:js' as js; 9 import 'dart:js' as js;
10 import '../utils.dart'; 10 import '../utils.dart';
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 main() { 57 main() {
58 useHtmlConfiguration(); 58 useHtmlConfiguration();
59 59
60 // Adapted from Blink's 60 // Adapted from Blink's
61 // fast/dom/custom/created-callback test. 61 // fast/dom/custom/created-callback test.
62 62
63 var registered = false; 63 var registered = false;
64 setUp(() { 64 setUp(() {
65 return loadPolyfills().then((_) { 65 return customElementsReady.then((_) {
66 if (!registered) { 66 if (!registered) {
67 registered = true; 67 registered = true;
68 document.register(B.tag, B); 68 document.register(B.tag, B);
69 document.register(C.tag, C); 69 document.register(C.tag, C);
70 ErrorConstructorElement.register(); 70 ErrorConstructorElement.register();
71 } 71 }
72 }); 72 });
73 }); 73 });
74 74
75 test('transfer created callback', () { 75 test('transfer created callback', () {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 } catch(e) { 290 } catch(e) {
291 rethrow; 291 rethrow;
292 } finally { 292 } finally {
293 js.context['testExpectsGlobalError'] = false; 293 js.context['testExpectsGlobalError'] = false;
294 } 294 }
295 var errors = js.context['testSuppressedGlobalErrors']; 295 var errors = js.context['testSuppressedGlobalErrors'];
296 expect(errors['length'], 1); 296 expect(errors['length'], 1);
297 // Clear out the errors; 297 // Clear out the errors;
298 js.context['testSuppressedGlobalErrors']['length'] = 0; 298 js.context['testSuppressedGlobalErrors']['length'] = 0;
299 } 299 }
OLDNEW
« no previous file with comments | « tests/html/custom/constructor_calls_created_synchronously_test.html ('k') | tests/html/custom/created_callback_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698