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

Unified Diff: mojo/dart/apptest/apptest/apptest.dart

Issue 996923003: Dart: Better handle leak checks. close() is async. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 5 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
« no previous file with comments | « examples/dart/wget/main.dart ('k') | mojo/dart/embedder/dart_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/dart/apptest/apptest/apptest.dart
diff --git a/mojo/dart/apptest/apptest/apptest.dart b/mojo/dart/apptest/apptest/apptest.dart
index a50fde9bbfa37580ed3724aaeefb8323cf02a35a..a59759d44ddb28f19546e5cc719d34af8d340ad8 100644
--- a/mojo/dart/apptest/apptest/apptest.dart
+++ b/mojo/dart/apptest/apptest/apptest.dart
@@ -19,8 +19,8 @@ export 'package:unittest/unittest.dart';
class _ConnectionToShellApplication extends Application {
final List<Function> _testFunctions;
- _ConnectionToShellApplication.fromHandle(MojoHandle handle,
- this._testFunctions)
+ _ConnectionToShellApplication.fromHandle(
+ MojoHandle handle, this._testFunctions)
: super.fromHandle(handle);
// Only run the test suite passed in once we have received an initialize()
@@ -45,9 +45,14 @@ class _CleanShutdownConfiguration extends SimpleConfiguration {
}
void onDone(bool success) {
- _application.close();
+ closeApplication();
super.onDone(success);
}
+
+ Future closeApplication() async {
+ await _application.close();
+ assert(MojoHandle.reportLeakedHandles());
+ }
}
// The public interface to apptests.
« no previous file with comments | « examples/dart/wget/main.dart ('k') | mojo/dart/embedder/dart_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698