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

Side by Side Diff: extensions/browser/api/power/power_api_unittest.cc

Issue 685503002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/api/power/power_api.h" 5 #include "extensions/browser/api/power/power_api.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 base::WeakPtrFactory<PowerSaveBlockerStubManager> weak_ptr_factory_; 122 base::WeakPtrFactory<PowerSaveBlockerStubManager> weak_ptr_factory_;
123 123
124 DISALLOW_COPY_AND_ASSIGN(PowerSaveBlockerStubManager); 124 DISALLOW_COPY_AND_ASSIGN(PowerSaveBlockerStubManager);
125 }; 125 };
126 126
127 } // namespace 127 } // namespace
128 128
129 class PowerApiTest : public ApiUnitTest { 129 class PowerApiTest : public ApiUnitTest {
130 public: 130 public:
131 virtual void SetUp() override { 131 void SetUp() override {
132 ApiUnitTest::SetUp(); 132 ApiUnitTest::SetUp();
133 manager_.reset(new PowerSaveBlockerStubManager(browser_context())); 133 manager_.reset(new PowerSaveBlockerStubManager(browser_context()));
134 } 134 }
135 135
136 virtual void TearDown() override { 136 void TearDown() override {
137 manager_.reset(); 137 manager_.reset();
138 ApiUnitTest::TearDown(); 138 ApiUnitTest::TearDown();
139 } 139 }
140 140
141 protected: 141 protected:
142 // Shorthand for PowerRequestKeepAwakeFunction and 142 // Shorthand for PowerRequestKeepAwakeFunction and
143 // PowerReleaseKeepAwakeFunction. 143 // PowerReleaseKeepAwakeFunction.
144 enum FunctionType { 144 enum FunctionType {
145 REQUEST, 145 REQUEST,
146 RELEASE, 146 RELEASE,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 EXPECT_EQ(NONE, manager_->PopFirstRequest()); 268 EXPECT_EQ(NONE, manager_->PopFirstRequest());
269 269
270 // Make the first extension block display-sleep again. 270 // Make the first extension block display-sleep again.
271 ASSERT_TRUE(CallFunction(REQUEST, kDisplayArgs, extension())); 271 ASSERT_TRUE(CallFunction(REQUEST, kDisplayArgs, extension()));
272 EXPECT_EQ(BLOCK_DISPLAY_SLEEP, manager_->PopFirstRequest()); 272 EXPECT_EQ(BLOCK_DISPLAY_SLEEP, manager_->PopFirstRequest());
273 EXPECT_EQ(UNBLOCK_APP_SUSPENSION, manager_->PopFirstRequest()); 273 EXPECT_EQ(UNBLOCK_APP_SUSPENSION, manager_->PopFirstRequest());
274 EXPECT_EQ(NONE, manager_->PopFirstRequest()); 274 EXPECT_EQ(NONE, manager_->PopFirstRequest());
275 } 275 }
276 276
277 } // namespace extensions 277 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/dns/dns_apitest.cc ('k') | extensions/browser/api/sockets_tcp/sockets_tcp_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698