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

Unified Diff: runtime/observatory/tests/observatory_ui/vm_connect_target/element_test.dart

Issue 2177843005: Removed onPopState event test from vm_connect_target tests (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/observatory_ui/vm_connect_target/element_test.dart
diff --git a/runtime/observatory/tests/observatory_ui/vm_connect_target/element_test.dart b/runtime/observatory/tests/observatory_ui/vm_connect_target/element_test.dart
index d5c9080b9c54e034cccac3479e4d46979fee741d..b84878de2eacf44c76910bfd7d28642dd11e37f0 100644
--- a/runtime/observatory/tests/observatory_ui/vm_connect_target/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/vm_connect_target/element_test.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
-import 'dart:async';
import 'package:unittest/unittest.dart';
import 'package:observatory/service_html.dart';
import 'package:observatory/src/elements/vm_connect_target.dart';
@@ -47,44 +46,38 @@ main() {
});
group('events are fired', () {
VMConnectTargetElement e;
- StreamSubscription sub;
setUp(() async {
e = new VMConnectTargetElement(t);
document.body.append(e);
await e.onRendered.first;
});
- tearDown(() {
- sub.cancel();
+ tearDown(() async {
e.remove();
- });
- test('navigation after connect', () async {
- sub = window.onPopState.listen(expectAsync((_) {}, count: 1,
- reason: 'event is fired'));
- e.querySelector('a').click();
+ await e.onRendered.first;
});
test('onConnect events (DOM)', () async {
- sub = e.onConnect.listen(expectAsync((TargetEvent event) {
+ e.onConnect.listen(expectAsync((TargetEvent event) {
expect(event, isNotNull, reason: 'event is passed');
expect(event.target, t, reason: 'target is the same');
}, count: 1, reason: 'event is fired'));
e.querySelector('a').click();
});
test('onConnect events (code)', () async {
- sub = e.onConnect.listen(expectAsync((TargetEvent event) {
+ e.onConnect.listen(expectAsync((TargetEvent event) {
expect(event, isNotNull, reason: 'event is passed');
expect(event.target, t, reason: 'target is the same');
}, count: 1, reason: 'event is fired'));
e.connect();
});
test('onRemove events (DOM)', () async {
- sub = e.onDelete.listen(expectAsync((TargetEvent event) {
+ e.onDelete.listen(expectAsync((TargetEvent event) {
expect(event, isNotNull, reason: 'event is passed');
expect(event.target, t, reason: 'target is the same');
}, count: 1, reason: 'event is fired'));
e.querySelector('button').click();
});
test('onRemove events (code)', () async {
- sub = e.onDelete.listen(expectAsync((TargetEvent event) {
+ e.onDelete.listen(expectAsync((TargetEvent event) {
expect(event, isNotNull, reason: 'event is passed');
expect(event.target, t, reason: 'target is the same');
}, count: 1, reason: 'event is fired'));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698