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

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

Issue 268313002: [dart:html] rename register to registerElement per spec (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 years, 7 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 attribute_changed_callback_test; 5 library attribute_changed_callback_test;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'dart:js' as js; 8 import 'dart:js' as js;
9 import 'package:unittest/html_individual_config.dart'; 9 import 'package:unittest/html_individual_config.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 main() { 46 main() {
47 useHtmlIndividualConfiguration(); 47 useHtmlIndividualConfiguration();
48 48
49 // Adapted from Blink's fast/dom/custom/attribute-changed-callback test. 49 // Adapted from Blink's fast/dom/custom/attribute-changed-callback test.
50 50
51 var registered = false; 51 var registered = false;
52 setUp(() => customElementsReady.then((_) { 52 setUp(() => customElementsReady.then((_) {
53 if (!registered) { 53 if (!registered) {
54 registered = true; 54 registered = true;
55 document.register(A.tag, A); 55 document.registerElement(A.tag, A);
56 document.register(B.tag, B); 56 document.registerElement(B.tag, B);
57 } 57 }
58 })); 58 }));
59 59
60 group('fully_supported', () { 60 group('fully_supported', () {
61 test('transfer attribute changed callback', () { 61 test('transfer attribute changed callback', () {
62 var element = new A(); 62 var element = new A();
63 63
64 element.attributes['a'] = 'b'; 64 element.attributes['a'] = 'b';
65 expect(A.attributeChangedInvocations, 1); 65 expect(A.attributeChangedInvocations, 1);
66 }); 66 });
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 test('add, change classes', () { 102 test('add, change classes', () {
103 var b = new B(); 103 var b = new B();
104 104
105 B.invocations = []; 105 B.invocations = [];
106 b.classes.toggle('u'); 106 b.classes.toggle('u');
107 expect(B.invocations, ['class: null => u']); 107 expect(B.invocations, ['class: null => u']);
108 }); 108 });
109 }); 109 });
110 } 110 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tests/html/custom/constructor_calls_created_synchronously_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698