OLD | NEW |
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 entered_left_view_test; | 5 library entered_left_view_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:html'; | 8 import 'dart:html'; |
9 import 'dart:js' as js; | 9 import 'dart:js' as js; |
10 import 'package:unittest/html_individual_config.dart'; | 10 import 'package:unittest/html_individual_config.dart'; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 var docA = document; | 71 var docA = document; |
72 var docB = document.implementation.createHtmlDocument(''); | 72 var docB = document.implementation.createHtmlDocument(''); |
73 | 73 |
74 var nullSanitizer = new NullTreeSanitizer(); | 74 var nullSanitizer = new NullTreeSanitizer(); |
75 | 75 |
76 var registeredTypes = false; | 76 var registeredTypes = false; |
77 setUp(() => customElementsReady.then((_) { | 77 setUp(() => customElementsReady.then((_) { |
78 if (registeredTypes) return; | 78 if (registeredTypes) return; |
79 registeredTypes = true; | 79 registeredTypes = true; |
80 document.register('x-a', Foo); | 80 document.registerElement('x-a', Foo); |
81 document.register('x-a-old', FooOldCallbacks); | 81 document.registerElement('x-a-old', FooOldCallbacks); |
82 })); | 82 })); |
83 | 83 |
84 group('standard_events', () { | 84 group('standard_events', () { |
85 var a; | 85 var a; |
86 setUp(() { | 86 setUp(() { |
87 invocations = []; | 87 invocations = []; |
88 }); | 88 }); |
89 | 89 |
90 test('Created', () { | 90 test('Created', () { |
91 a = new Element.tag('x-a'); | 91 a = new Element.tag('x-a'); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 upgradeCustomElements(div); | 302 upgradeCustomElements(div); |
303 invocations = []; | 303 invocations = []; |
304 document.body.append(div); | 304 document.body.append(div); |
305 customElementsTakeRecords(); | 305 customElementsTakeRecords(); |
306 expect(invocations, ['attached'], | 306 expect(invocations, ['attached'], |
307 reason: 'the attached callback should be invoked when inserted into a
' | 307 reason: 'the attached callback should be invoked when inserted into a
' |
308 'document with a view as part of a subtree'); | 308 'document with a view as part of a subtree'); |
309 }); | 309 }); |
310 }); | 310 }); |
311 } | 311 } |
OLD | NEW |