Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Side by Side Diff: device/wake_lock/wake_lock_service_context_unittest.cc

Issue 2389743002: Content Modularization Project: Move Wake Lock to //device (Closed)
Patch Set: Eliminate frame reference Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "device/wake_lock/wake_lock_service_context.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/process/kill.h" 10 #include "base/process/kill.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace content { 13 namespace device {
14 14
15 class WakeLockServiceContextTest : public testing::Test { 15 class WakeLockServiceContextTest : public testing::Test {
16 public: 16 public:
17 WakeLockServiceContextTest() 17 WakeLockServiceContextTest()
18 : wake_lock_service_context_( 18 : wake_lock_service_context_(
19 base::ThreadTaskRunnerHandle::Get(), 19 base::ThreadTaskRunnerHandle::Get(),
20 base::Bind(&WakeLockServiceContextTest::GetNativeView, 20 base::Bind(&WakeLockServiceContextTest::GetNativeView,
21 base::Unretained(this))) {} 21 base::Unretained(this))) {}
22 22
23 protected: 23 protected:
(...skipping 29 matching lines...) Expand all
53 // Should set the blocker. 53 // Should set the blocker.
54 EXPECT_TRUE(HasWakeLock()); 54 EXPECT_TRUE(HasWakeLock());
55 55
56 // Remove wake lock request. 56 // Remove wake lock request.
57 CancelWakeLock(); 57 CancelWakeLock();
58 58
59 // Should remove the blocker. 59 // Should remove the blocker.
60 EXPECT_FALSE(HasWakeLock()); 60 EXPECT_FALSE(HasWakeLock());
61 } 61 }
62 62
63 } // namespace content 63 } // namespace device
OLDNEW
« no previous file with comments | « device/wake_lock/wake_lock_service_context.cc ('k') | device/wake_lock/wake_lock_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698