| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/public/cpp/environment/environment.h" | 5 #include "mojo/public/cpp/environment/environment.h" |
| 6 #include "mojo/public/cpp/test_support/test_utils.h" | 6 #include "mojo/public/cpp/test_support/test_utils.h" |
| 7 #include "mojo/public/cpp/utility/run_loop.h" | 7 #include "mojo/public/cpp/utility/run_loop.h" |
| 8 #include "mojo/public/interfaces/bindings/tests/sample_factory.mojom.h" | 8 #include "mojo/public/interfaces/bindings/tests/sample_factory.mojom.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 private: | 160 private: |
| 161 ScopedMessagePipeHandle pipe1_; | 161 ScopedMessagePipeHandle pipe1_; |
| 162 ScopedMessagePipeHandle pipe3_; | 162 ScopedMessagePipeHandle pipe3_; |
| 163 std::string expected_text_reply_; | 163 std::string expected_text_reply_; |
| 164 bool got_response_; | 164 bool got_response_; |
| 165 }; | 165 }; |
| 166 | 166 |
| 167 class HandlePassingTest : public testing::Test { | 167 class HandlePassingTest : public testing::Test { |
| 168 public: | 168 public: |
| 169 virtual void TearDown() { PumpMessages(); } | 169 void TearDown() override { PumpMessages(); } |
| 170 | 170 |
| 171 void PumpMessages() { loop_.RunUntilIdle(); } | 171 void PumpMessages() { loop_.RunUntilIdle(); } |
| 172 | 172 |
| 173 private: | 173 private: |
| 174 Environment env_; | 174 Environment env_; |
| 175 RunLoop loop_; | 175 RunLoop loop_; |
| 176 }; | 176 }; |
| 177 | 177 |
| 178 TEST_F(HandlePassingTest, Basic) { | 178 TEST_F(HandlePassingTest, Basic) { |
| 179 sample::FactoryPtr factory; | 179 sample::FactoryPtr factory; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 333 |
| 334 PumpMessages(); // Yield for results. | 334 PumpMessages(); // Yield for results. |
| 335 | 335 |
| 336 EXPECT_EQ(std::string("object1"), name1); | 336 EXPECT_EQ(std::string("object1"), name1); |
| 337 EXPECT_EQ(std::string("object2"), name2); | 337 EXPECT_EQ(std::string("object2"), name2); |
| 338 } | 338 } |
| 339 | 339 |
| 340 } // namespace | 340 } // namespace |
| 341 } // namespace test | 341 } // namespace test |
| 342 } // namespace mojo | 342 } // namespace mojo |
| OLD | NEW |