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

Side by Side Diff: runtime/observatory/tests/observatory_ui/isolate_ref/element_test.dart

Issue 2204563003: Converted Observatory cpu-profile element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged with master Created 4 years, 4 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 import 'dart:html'; 5 import 'dart:html';
5 import 'package:unittest/unittest.dart'; 6 import 'package:unittest/unittest.dart';
6 import 'package:observatory/src/elements/isolate_ref.dart'; 7 import 'package:observatory/src/elements/isolate_ref.dart';
7 import '../mocks.dart'; 8 import '../mocks.dart';
8 9
9 main(){ 10 main() {
10 IsolateRefElement.tag.ensureRegistration(); 11 IsolateRefElement.tag.ensureRegistration();
11 12
12 final ref = new IsolateRefMock(id: 'id', name: 'old-name'); 13 final ref = new IsolateRefMock(id: 'id', name: 'old-name');
13 final events = new EventRepositoryMock(); 14 final events = new EventRepositoryMock();
14 final obj = new IsolateMock(id: 'id', name: 'new-name'); 15 final obj = new IsolateMock(id: 'id', name: 'new-name');
15 group('instantiation', () { 16 group('instantiation', () {
16 test('IsolateRef', () { 17 test('IsolateRef', () {
17 final e = new IsolateRefElement(ref, events); 18 final e = new IsolateRefElement(ref, events);
18 expect(e, isNotNull, reason: 'element correctly created'); 19 expect(e, isNotNull, reason: 'element correctly created');
19 expect(e.isolate, equals(ref)); 20 expect(e.isolate, equals(ref));
(...skipping 30 matching lines...) Expand all
50 await e.onRendered.first; 51 await e.onRendered.first;
51 expect(e.innerHtml.contains(ref.id), isTrue); 52 expect(e.innerHtml.contains(ref.id), isTrue);
52 events.add(new IsolateUpdateEventMock(isolate: obj)); 53 events.add(new IsolateUpdateEventMock(isolate: obj));
53 await e.onRendered.first; 54 await e.onRendered.first;
54 expect(e.innerHtml.contains(ref.name), isFalse); 55 expect(e.innerHtml.contains(ref.name), isFalse);
55 expect(e.innerHtml.contains(obj.name), isTrue); 56 expect(e.innerHtml.contains(obj.name), isTrue);
56 e.remove(); 57 e.remove();
57 }); 58 });
58 }); 59 });
59 } 60 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698