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

Side by Side Diff: runtime/observatory/tests/observatory_ui/nav/notify_exception/exception_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 'dart:async'; 6 import 'dart:async';
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 import 'package:observatory/src/elements/nav/notify_exception.dart'; 8 import 'package:observatory/src/elements/nav/notify_exception.dart';
9 9
10 main() { 10 main() {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 setUp(() async { 57 setUp(() async {
58 e = new NavNotifyExceptionElement(ex, stacktrace: st); 58 e = new NavNotifyExceptionElement(ex, stacktrace: st);
59 document.body.append(e); 59 document.body.append(e);
60 await e.onRendered.first; 60 await e.onRendered.first;
61 }); 61 });
62 tearDown(() { 62 tearDown(() {
63 sub.cancel(); 63 sub.cancel();
64 e.remove(); 64 e.remove();
65 }); 65 });
66 test('navigation after connect', () async { 66 test('navigation after connect', () async {
67 sub = window.onPopState.listen(expectAsync((_) {}, count: 1, 67 sub = window.onPopState
68 reason: 'event is fired')); 68 .listen(expectAsync((_) {}, count: 1, reason: 'event is fired'));
69 e.querySelector('a').click(); 69 e.querySelector('a').click();
70 }); 70 });
71 test('onDelete events (DOM)', () async { 71 test('onDelete events (DOM)', () async {
72 sub = e.onDelete.listen(expectAsync((ExceptionDeleteEvent event) { 72 sub = e.onDelete.listen(expectAsync((ExceptionDeleteEvent event) {
73 expect(event, isNotNull, reason: 'event is passed'); 73 expect(event, isNotNull, reason: 'event is passed');
74 expect(event.exception, equals(ex), reason: 'exception is the same'); 74 expect(event.exception, equals(ex), reason: 'exception is the same');
75 expect(event.stacktrace, equals(st), 75 expect(event.stacktrace, equals(st),
76 reason: 'stacktrace is the same'); 76 reason: 'stacktrace is the same');
77 }, count: 1, reason: 'event is fired')); 77 }, count: 1, reason: 'event is fired'));
78 e.querySelector('button').click(); 78 e.querySelector('button').click();
79 }); 79 });
80 test('onDelete events (code)', () async { 80 test('onDelete events (code)', () async {
81 sub = e.onDelete.listen(expectAsync((ExceptionDeleteEvent event) { 81 sub = e.onDelete.listen(expectAsync((ExceptionDeleteEvent event) {
82 expect(event, isNotNull, reason: 'event is passed'); 82 expect(event, isNotNull, reason: 'event is passed');
83 expect(event.exception, equals(ex), reason: 'exception is the same'); 83 expect(event.exception, equals(ex), reason: 'exception is the same');
84 expect(event.stacktrace, equals(st), 84 expect(event.stacktrace, equals(st),
85 reason: 'stacktrace is the same'); 85 reason: 'stacktrace is the same');
86 }, count: 1, reason: 'event is fired')); 86 }, count: 1, reason: 'event is fired'));
87 e.delete(); 87 e.delete();
88 }); 88 });
89 }); 89 });
90 }); 90 });
91 } 91 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698