OLD | NEW |
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2008 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/waitable_event.h" | 5 #include "base/waitable_event.h" |
6 #include "chrome/common/ipc_sync_channel.h" | |
7 #include "chrome/common/render_messages.h" | 6 #include "chrome/common/render_messages.h" |
8 #include "chrome/renderer/mock_render_process.h" | 7 #include "chrome/renderer/mock_render_process.h" |
9 #include "chrome/renderer/render_thread.h" | 8 #include "chrome/renderer/render_thread.h" |
| 9 #include "ipc/ipc_sync_channel.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 const char kThreadName[] = "render_thread_unittest"; | 14 const char kThreadName[] = "render_thread_unittest"; |
15 | 15 |
16 class RenderThreadTest : public testing::Test { | 16 class RenderThreadTest : public testing::Test { |
17 public: | 17 public: |
18 virtual void SetUp() { | 18 virtual void SetUp() { |
19 // Need a MODE_SERVER to make MODE_CLIENTs (like a RenderThread) happy. | 19 // Need a MODE_SERVER to make MODE_CLIENTs (like a RenderThread) happy. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // Message goes nowhere, but this confirms Init() has happened. | 56 // Message goes nowhere, but this confirms Init() has happened. |
57 // Unusually (?), RenderThread() Start()s itself in it's constructor. | 57 // Unusually (?), RenderThread() Start()s itself in it's constructor. |
58 mock_process_->child_thread()->Send(msg); | 58 mock_process_->child_thread()->Send(msg); |
59 | 59 |
60 // No need to delete msg; per Message::Send() documentation, "The | 60 // No need to delete msg; per Message::Send() documentation, "The |
61 // implementor takes ownership of the given Message regardless of | 61 // implementor takes ownership of the given Message regardless of |
62 // whether or not this method succeeds." | 62 // whether or not this method succeeds." |
63 } | 63 } |
64 | 64 |
65 } // namespace | 65 } // namespace |
OLD | NEW |