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

Side by Side Diff: runtime/observatory/tests/observatory_ui/nav/menu-item/element_test.dart

Issue 2759973004: Fix observatory tests broken by running dartfmt. Temporarily reverted formatting for evaluate_activ… (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'dart:html'; 5 import 'dart:html';
6 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
7 import 'package:observatory/src/elements/nav/menu_item.dart'; 7 import 'package:observatory/src/elements/nav/menu_item.dart';
8 8
9 main() { 9 main() {
10 NavMenuItemElement.tag.ensureRegistration(); 10 NavMenuItemElement.tag.ensureRegistration();
(...skipping 14 matching lines...) Expand all
25 }); 25 });
26 group('elements', () { 26 group('elements', () {
27 test('created', () async { 27 test('created', () async {
28 final label = 'custom-label'; 28 final label = 'custom-label';
29 final e = new NavMenuItemElement(label); 29 final e = new NavMenuItemElement(label);
30 e.content = [document.createElement('content')]; 30 e.content = [document.createElement('content')];
31 document.body.append(e); 31 document.body.append(e);
32 await e.onRendered.first; 32 await e.onRendered.first;
33 expect(e.children.length, isNonZero, reason: 'has elements'); 33 expect(e.children.length, isNonZero, reason: 'has elements');
34 expect(e.querySelector('content'), isNotNull, 34 expect(e.querySelector('content'), isNotNull,
35 reason: 'has content elements') ; 35 reason: 'has content elements');
36 e.remove(); 36 e.remove();
37 await e.onRendered.first; 37 await e.onRendered.first;
38 expect(e.children.length, isZero, reason: 'is empty'); 38 expect(e.children.length, isZero, reason: 'is empty');
39 }); 39 });
40 test('react to label change', () async { 40 test('react to label change', () async {
41 final label1 = 'custom-label-1'; 41 final label1 = 'custom-label-1';
42 final label2 = 'custom-label-2'; 42 final label2 = 'custom-label-2';
43 final e = new NavMenuItemElement(label1); 43 final e = new NavMenuItemElement(label1);
44 document.body.append(e); 44 document.body.append(e);
45 await e.onRendered.first; 45 await e.onRendered.first;
(...skipping 17 matching lines...) Expand all
63 expect(e.innerHtml.contains(link2), isFalse); 63 expect(e.innerHtml.contains(link2), isFalse);
64 e.link = link2; 64 e.link = link2;
65 await e.onRendered.first; 65 await e.onRendered.first;
66 expect(e.innerHtml.contains(link1), isFalse); 66 expect(e.innerHtml.contains(link1), isFalse);
67 expect(e.innerHtml.contains(link2), isTrue); 67 expect(e.innerHtml.contains(link2), isTrue);
68 e.remove(); 68 e.remove();
69 await e.onRendered.first; 69 await e.onRendered.first;
70 }); 70 });
71 }); 71 });
72 } 72 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698