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

Unified Diff: mojo/public/tests/bindings/handle_passing_unittest.cc

Issue 134253004: Mojo: AsyncWaiter and mojo/public/environment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing files Created 6 years, 11 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/tests/bindings/handle_passing_unittest.cc
diff --git a/mojo/public/tests/bindings/handle_passing_unittest.cc b/mojo/public/tests/bindings/handle_passing_unittest.cc
index 21b26f21ed68733b6e54f57bfbf7c5960ecd112d..ca2d27094b1aba9f9ab5ddff870b4a74ffcd9427 100644
--- a/mojo/public/tests/bindings/handle_passing_unittest.cc
+++ b/mojo/public/tests/bindings/handle_passing_unittest.cc
@@ -3,8 +3,9 @@
// found in the LICENSE file.
#include "mojo/public/bindings/lib/remote_ptr.h"
-#include "mojo/public/tests/bindings/simple_bindings_support.h"
+#include "mojo/public/environment/environment.h"
#include "mojo/public/tests/test_support.h"
+#include "mojo/public/utility/run_loop.h"
#include "mojom/sample_factory.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -125,17 +126,18 @@ class SampleFactoryClientImpl : public sample::FactoryClient {
} // namespace
-class BindingsHandlePassingTest : public testing::Test {
+class HandlePassingTest : public testing::Test {
public:
void PumpMessages() {
- bindings_support_.Process();
+ loop_.RunUntilIdle();
}
private:
- SimpleBindingsSupport bindings_support_;
+ Environment env_;
+ RunLoop loop_;
};
-TEST_F(BindingsHandlePassingTest, Basic) {
+TEST_F(HandlePassingTest, Basic) {
ScopedMessagePipeHandle pipe0;
ScopedMessagePipeHandle pipe1;
CreateMessagePipe(&pipe0, &pipe1);
@@ -152,7 +154,7 @@ TEST_F(BindingsHandlePassingTest, Basic) {
EXPECT_TRUE(factory_client.got_response());
}
-TEST_F(BindingsHandlePassingTest, PassInvalid) {
+TEST_F(HandlePassingTest, PassInvalid) {
ScopedMessagePipeHandle pipe0;
ScopedMessagePipeHandle pipe1;
CreateMessagePipe(&pipe0, &pipe1);

Powered by Google App Engine
This is Rietveld 408576698