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

Side by Side Diff: chrome/browser/chromeos/power/peripheral_battery_observer_browsertest.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 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 "chrome/browser/chromeos/power/peripheral_battery_observer.h" 5 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 observer_.reset(new PeripheralBatteryObserver()); 49 observer_.reset(new PeripheralBatteryObserver());
50 } 50 }
51 51
52 void TearDownOnMainThread() override { observer_.reset(); } 52 void TearDownOnMainThread() override { observer_.reset(); }
53 53
54 void TearDownInProcessBrowserTestFixture() override { 54 void TearDownInProcessBrowserTestFixture() override {
55 InProcessBrowserTest::TearDownInProcessBrowserTestFixture(); 55 InProcessBrowserTest::TearDownInProcessBrowserTestFixture();
56 } 56 }
57 57
58 protected: 58 protected:
59 scoped_ptr<PeripheralBatteryObserver> observer_; 59 std::unique_ptr<PeripheralBatteryObserver> observer_;
60 60
61 private: 61 private:
62 DISALLOW_COPY_AND_ASSIGN(PeripheralBatteryObserverTest); 62 DISALLOW_COPY_AND_ASSIGN(PeripheralBatteryObserverTest);
63 }; 63 };
64 64
65 IN_PROC_BROWSER_TEST_F(PeripheralBatteryObserverTest, Basic) { 65 IN_PROC_BROWSER_TEST_F(PeripheralBatteryObserverTest, Basic) {
66 base::SimpleTestTickClock clock; 66 base::SimpleTestTickClock clock;
67 observer_->set_testing_clock(&clock); 67 observer_->set_testing_clock(&clock);
68 68
69 NotificationUIManager* notification_manager = 69 NotificationUIManager* notification_manager =
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 ProfileManager::GetPrimaryUserProfile())) != NULL); 169 ProfileManager::GetPrimaryUserProfile())) != NULL);
170 170
171 observer_->RemoveBattery(kTestBatteryAddress); 171 observer_->RemoveBattery(kTestBatteryAddress);
172 EXPECT_FALSE(notification_manager->FindById( 172 EXPECT_FALSE(notification_manager->FindById(
173 kTestBatteryAddress, 173 kTestBatteryAddress,
174 NotificationUIManager::GetProfileID( 174 NotificationUIManager::GetProfileID(
175 ProfileManager::GetPrimaryUserProfile())) != NULL); 175 ProfileManager::GetPrimaryUserProfile())) != NULL);
176 } 176 }
177 177
178 } // namespace chromeos 178 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/power/peripheral_battery_observer.h ('k') | chrome/browser/chromeos/power/power_button_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698