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

Unified Diff: mojo/dart/test/handle_finalizer_test.dart

Issue 1545483003: Dart: Reorganize files (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix build file Created 5 years 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 | « mojo/dart/test/exception_test.dart ('k') | mojo/dart/test/hello_mojo.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/dart/test/handle_finalizer_test.dart
diff --git a/mojo/dart/test/handle_finalizer_test.dart b/mojo/dart/test/handle_finalizer_test.dart
deleted file mode 100644
index c26a728b161e783d4469b91d2d682f90e7faf601..0000000000000000000000000000000000000000
--- a/mojo/dart/test/handle_finalizer_test.dart
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2014 The Chromium Authors. 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:async';
-import 'dart:isolate';
-import 'dart:typed_data';
-
-import 'package:_mojo_for_test_only/expect.dart';
-import 'package:mojo/core.dart';
-
-MojoHandle leakMojoHandle() {
- var pipe = new MojoMessagePipe();
- Expect.isNotNull(pipe);
-
- var endpoint = pipe.endpoints[0];
- Expect.isTrue(endpoint.handle.isValid);
-
- var eventSubscription = new MojoEventSubscription(endpoint.handle);
- // After making a MojoEventSubscription, the underlying mojo handle will have
- // the native MojoClose called on it when the MojoEventSubscription is GC'd or
- // the VM shuts down.
-
- return endpoint.handle;
-}
-
-// vmoptions: --new-gen-semi-max-size=1 --old_gen_growth_rate=1
-List<int> triggerGC() {
- var l = new List.filled(1000000, 7);
- return l;
-}
-
-test() {
- MojoHandle handle = leakMojoHandle();
- triggerGC();
-
- // The handle will be closed by the MojoHandle finalizer during GC, so the
- // attempt to close it again will fail.
- int result = handle.close();
- Expect.isTrue(result == MojoResult.kInvalidArgument);
-}
-
-main() {
- test();
-}
« no previous file with comments | « mojo/dart/test/exception_test.dart ('k') | mojo/dart/test/hello_mojo.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698