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

Unified Diff: runtime/observatory/tests/observatory_ui/vm_connect/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 side-by-side diff with in-line comments
Download patch
Index: runtime/observatory/tests/observatory_ui/vm_connect/element_test.dart
diff --git a/runtime/observatory/tests/observatory_ui/vm_connect/element_test.dart b/runtime/observatory/tests/observatory_ui/vm_connect/element_test.dart
index 1a46af5c54b93a1b4a047afafe5cd108aef19ca2..f087af7d74f4f6e14e3281db3b8566fa5eabbfcd 100644
--- a/runtime/observatory/tests/observatory_ui/vm_connect/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/vm_connect/element_test.dart
@@ -19,15 +19,15 @@ main() {
group('instantiation', () {
test('default', () {
- final e = new VMConnectElement(new TargetRepositoryMock(),
- load, new NotificationRepositoryMock());
+ final e = new VMConnectElement(
+ new TargetRepositoryMock(), load, new NotificationRepositoryMock());
expect(e, isNotNull, reason: 'element correctly created');
});
});
test('is correctly listening', () async {
final targets = new TargetRepositoryMock();
- final e = new VMConnectElement(targets, load,
- new NotificationRepositoryMock());
+ final e =
+ new VMConnectElement(targets, load, new NotificationRepositoryMock());
document.body.append(e);
await e.onRendered.first;
expect(targets.hasListeners, isTrue, reason: 'is listening');
@@ -38,10 +38,11 @@ main() {
group('elements', () {
test('created after attachment', () async {
final targets = new TargetRepositoryMock(list: const [
- const TargetMock(name: 't-1'), const TargetMock(name: 't-2'),
- ]);
- final e = new VMConnectElement(targets, load,
- new NotificationRepositoryMock());
+ const TargetMock(name: 't-1'),
+ const TargetMock(name: 't-2'),
+ ]);
+ final e =
+ new VMConnectElement(targets, load, new NotificationRepositoryMock());
document.body.append(e);
await e.onRendered.first;
expect(targets.listInvoked, isTrue, reason: 'should invoke list()');
@@ -55,8 +56,8 @@ main() {
test('react to update event', () async {
final list = <TargetMock>[const TargetMock(name: 't-1')];
final targets = new TargetRepositoryMock(list: list);
- final e = new VMConnectElement(targets, load,
- new NotificationRepositoryMock());
+ final e =
+ new VMConnectElement(targets, load, new NotificationRepositoryMock());
document.body.append(e);
await e.onRendered.first;
expect(e.querySelectorAll(tTag).length, equals(1));
@@ -73,12 +74,14 @@ main() {
test('add on click', () async {
final address = 'ws://host:1234/ws';
final list = <TargetMock>[const TargetMock(name: 't-1')];
- final targets = new TargetRepositoryMock(list: list,
+ final targets = new TargetRepositoryMock(
+ list: list,
add: expectAsync((String val) {
expect(val, equals(address));
}, count: 1, reason: 'should be invoked'));
- final e = new VMConnectElement(targets, load,
- new NotificationRepositoryMock(), address: address);
+ final e = new VMConnectElement(
+ targets, load, new NotificationRepositoryMock(),
+ address: address);
document.body.append(e);
await e.onRendered.first;
(e.querySelector('button.vm_connect') as ButtonElement).click();
@@ -87,12 +90,13 @@ main() {
});
test('connect', () async {
final list = <TargetMock>[const TargetMock(name: 't-1')];
- final targets = new TargetRepositoryMock(list: list,
+ final targets = new TargetRepositoryMock(
+ list: list,
setCurrent: expectAsync((TargetMock t) {
expect(t, equals(list[0]));
}, count: 1, reason: 'should be invoked'));
- final e = new VMConnectElement(targets, load,
- new NotificationRepositoryMock());
+ final e =
+ new VMConnectElement(targets, load, new NotificationRepositoryMock());
document.body.append(e);
await e.onRendered.first;
(e.querySelector(tTag) as VMConnectTargetElement).connect();
@@ -101,12 +105,13 @@ main() {
});
test('delete', () async {
final list = <TargetMock>[const TargetMock(name: 't-1')];
- final targets = new TargetRepositoryMock(list: list,
+ final targets = new TargetRepositoryMock(
+ list: list,
delete: expectAsync((TargetMock t) {
expect(t, equals(list[0]));
}, count: 1, reason: 'should be invoked'));
- final e = new VMConnectElement(targets, load,
- new NotificationRepositoryMock());
+ final e =
+ new VMConnectElement(targets, load, new NotificationRepositoryMock());
document.body.append(e);
await e.onRendered.first;
(e.querySelector(tTag) as VMConnectTargetElement).delete();

Powered by Google App Engine
This is Rietveld 408576698