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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/memory/discardable_memory.h" | 6 #include "base/memory/discardable_memory.h" |
7 #include "base/memory/scoped_vector.h" | 7 #include "base/memory/scoped_vector.h" |
8 #include "content/public/browser/content_browser_client.h" | 8 #include "content/public/browser/content_browser_client.h" |
9 #include "content/public/common/content_client.h" | 9 #include "content/public/common/content_client.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
11 #include "content/public/renderer/content_renderer_client.h" | 11 #include "content/public/renderer/content_renderer_client.h" |
12 #include "content/renderer/render_process_impl.h" | 12 #include "content/renderer/render_process_impl.h" |
13 #include "content/renderer/render_thread_impl.h" | 13 #include "content/renderer/render_thread_impl.h" |
14 #include "content/test/mock_render_process.h" | 14 #include "content/test/mock_render_process.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 namespace { | 18 namespace { |
19 | 19 |
20 class RenderThreadImplBrowserTest : public testing::Test { | 20 class RenderThreadImplBrowserTest : public testing::Test { |
21 public: | 21 public: |
22 virtual ~RenderThreadImplBrowserTest() {} | 22 virtual ~RenderThreadImplBrowserTest() {} |
23 }; | 23 }; |
24 | 24 |
25 class DummyListener : public IPC::Listener { | 25 class DummyListener : public IPC::Listener { |
26 public: | 26 public: |
27 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE { | 27 virtual bool OnMessageReceived(const IPC::Message& message) override { |
28 return true; | 28 return true; |
29 } | 29 } |
30 }; | 30 }; |
31 | 31 |
32 void CheckRenderThreadInputHandlerManager(RenderThreadImpl* thread) { | 32 void CheckRenderThreadInputHandlerManager(RenderThreadImpl* thread) { |
33 ASSERT_TRUE(thread->input_handler_manager()); | 33 ASSERT_TRUE(thread->input_handler_manager()); |
34 } | 34 } |
35 | 35 |
36 // Check that InputHandlerManager outlives compositor thread because it uses | 36 // Check that InputHandlerManager outlives compositor thread because it uses |
37 // raw pointers to post tasks. | 37 // raw pointers to post tasks. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 if ((*iter)->Lock() == base::DISCARDABLE_MEMORY_LOCK_STATUS_SUCCESS) | 125 if ((*iter)->Lock() == base::DISCARDABLE_MEMORY_LOCK_STATUS_SUCCESS) |
126 ++blocks_left; | 126 ++blocks_left; |
127 } | 127 } |
128 EXPECT_LE(blocks_left, 1); | 128 EXPECT_LE(blocks_left, 1); |
129 | 129 |
130 thread->WidgetDestroyed(); | 130 thread->WidgetDestroyed(); |
131 } | 131 } |
132 | 132 |
133 } // namespace | 133 } // namespace |
134 } // namespace content | 134 } // namespace content |
OLD | NEW |