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

Unified Diff: mojo/public/cpp/bindings/tests/array_unittest.cc

Issue 265793015: Mojo: Replace RemotePtr with InterfacePtr and InterfaceImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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: mojo/public/cpp/bindings/tests/array_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/array_unittest.cc b/mojo/public/cpp/bindings/tests/array_unittest.cc
index dccd7167e9ecfe1ba50c4bb6736e7ddb0375133e..4bef4cd57001916be97b21a5f12540a47f7578aa 100644
--- a/mojo/public/cpp/bindings/tests/array_unittest.cc
+++ b/mojo/public/cpp/bindings/tests/array_unittest.cc
@@ -4,7 +4,6 @@
#include "mojo/public/cpp/bindings/allocation_scope.h"
#include "mojo/public/cpp/bindings/array.h"
-#include "mojo/public/cpp/bindings/interface.h"
#include "mojo/public/cpp/bindings/lib/fixed_buffer.h"
#include "mojo/public/cpp/bindings/lib/scratch_buffer.h"
#include "mojo/public/cpp/environment/environment.h"
@@ -141,31 +140,6 @@ TEST(ArrayTest, MessagePipeHandlesAreClosed) {
EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT, MojoClose(pipe1_value));
}
-// Tests that Array<InterfaceHandle<S>> supports closing handles.
-TEST(ArrayTest, InterfaceHandlesAreClosed) {
- Environment env;
-
- InterfacePipe<sample::Port, sample::Port> pipe;
-
- MojoHandle pipe0_value = pipe.handle_to_self.get().value();
- MojoHandle pipe1_value = pipe.handle_to_peer.get().value();
-
- {
- AllocationScope scope;
-
- Array<sample::PortHandle>::Builder handles_builder(2);
- handles_builder[0] = pipe.handle_to_self.Pass();
- handles_builder[1].reset(pipe.handle_to_peer.release());
-
- MOJO_ALLOW_UNUSED Array<sample::PortHandle> handles =
- handles_builder.Finish();
- }
-
- // We expect the pipes to have been closed.
- EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT, MojoClose(pipe0_value));
- EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT, MojoClose(pipe1_value));
-}
-
} // namespace
} // namespace test
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698