| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/message_loop/message_loop.h" | 5 #include "base/message_loop/message_loop.h" |
| 6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
| 7 #include "mojo/message_pump/message_pump_mojo.h" | 7 #include "mojo/message_pump/message_pump_mojo.h" |
| 8 #include "mojo/public/cpp/bindings/binding.h" |
| 9 #include "mojo/public/cpp/bindings/interface_ptr.h" |
| 10 #include "mojo/public/cpp/bindings/string.h" |
| 11 #include "mojo/public/cpp/system/message_pipe.h" |
| 12 #include "mojo/public/cpp/test_support/test_support.h" |
| 13 #include "mojo/public/interfaces/bindings/tests/sample_interfaces.mojom.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" | |
| 10 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_ptr.h" | |
| 11 #include "third_party/mojo/src/mojo/public/cpp/bindings/string.h" | |
| 12 #include "third_party/mojo/src/mojo/public/cpp/system/message_pipe.h" | |
| 13 #include "third_party/mojo/src/mojo/public/cpp/test_support/test_support.h" | |
| 14 #include "third_party/mojo/src/mojo/public/interfaces/bindings/tests/sample_inte
rfaces.mojom.h" | |
| 15 | 15 |
| 16 /////////////////////////////////////////////////////////////////////////////// | 16 /////////////////////////////////////////////////////////////////////////////// |
| 17 // | 17 // |
| 18 // The tests in this file are designed to test the interaction between a | 18 // The tests in this file are designed to test the interaction between a |
| 19 // Callback and its associated Binding. If a Callback is deleted before | 19 // Callback and its associated Binding. If a Callback is deleted before |
| 20 // being used we DCHECK fail--unless the associated Binding has already | 20 // being used we DCHECK fail--unless the associated Binding has already |
| 21 // been closed or deleted. This contract must be explained to the Mojo | 21 // been closed or deleted. This contract must be explained to the Mojo |
| 22 // application developer. For example it is the developer's responsibility to | 22 // application developer. For example it is the developer's responsibility to |
| 23 // ensure that the Binding is destroyed before an unused Callback is destroyed. | 23 // ensure that the Binding is destroyed before an unused Callback is destroyed. |
| 24 // | 24 // |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 // TODO(msw): Fix MOJO_DCHECK logs and EXPECT_DEATH* on Win: crbug.com/535014 | 296 // TODO(msw): Fix MOJO_DCHECK logs and EXPECT_DEATH* on Win: crbug.com/535014 |
| 297 regex.clear(); | 297 regex.clear(); |
| 298 #endif // OS_WIN | 298 #endif // OS_WIN |
| 299 EXPECT_DEATH_IF_SUPPORTED(server_impl.DeleteCallback(), regex.c_str()); | 299 EXPECT_DEATH_IF_SUPPORTED(server_impl.DeleteCallback(), regex.c_str()); |
| 300 #endif // !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) | 300 #endif // !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) |
| 301 } | 301 } |
| 302 | 302 |
| 303 } // namespace | 303 } // namespace |
| 304 } // namespace test | 304 } // namespace test |
| 305 } // namespace mojo | 305 } // namespace mojo |
| OLD | NEW |