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 "content/browser/wake_lock/wake_lock_service_context.h" | 5 #include "content/browser/wake_lock/wake_lock_service_context.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include <memory> |
| 8 |
8 #include "base/process/kill.h" | 9 #include "base/process/kill.h" |
9 #include "content/browser/web_contents/web_contents_impl.h" | 10 #include "content/browser/web_contents/web_contents_impl.h" |
10 #include "content/public/browser/render_frame_host.h" | 11 #include "content/public/browser/render_frame_host.h" |
11 #include "content/public/browser/render_process_host.h" | 12 #include "content/public/browser/render_process_host.h" |
12 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
13 #include "content/public/test/test_renderer_host.h" | 14 #include "content/public/test/test_renderer_host.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 | 17 |
17 class RenderFrameHost; | 18 class RenderFrameHost; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 int non_existent_render_frame_id = | 88 int non_existent_render_frame_id = |
88 main_rfh()->GetProcess()->GetNextRoutingID(); | 89 main_rfh()->GetProcess()->GetNextRoutingID(); |
89 GetWakeLockServiceContext()->RequestWakeLock( | 90 GetWakeLockServiceContext()->RequestWakeLock( |
90 main_rfh()->GetProcess()->GetID(), non_existent_render_frame_id); | 91 main_rfh()->GetProcess()->GetID(), non_existent_render_frame_id); |
91 | 92 |
92 // Should not set the blocker. | 93 // Should not set the blocker. |
93 EXPECT_FALSE(HasWakeLock()); | 94 EXPECT_FALSE(HasWakeLock()); |
94 } | 95 } |
95 | 96 |
96 } // namespace content | 97 } // namespace content |
OLD | NEW |