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

Side by Side Diff: chrome/browser/chromeos/system/device_disabling_manager_unittest.cc

Issue 1086733002: Ensure tests have an active task runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 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 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 "chrome/browser/chromeos/system/device_disabling_manager.h" 5 #include "chrome/browser/chromeos/system/device_disabling_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 void CheckWhetherDeviceDisabledDuringOOBE(); 130 void CheckWhetherDeviceDisabledDuringOOBE();
131 131
132 void SetDeviceDisabled(bool disabled); 132 void SetDeviceDisabled(bool disabled);
133 133
134 private: 134 private:
135 void OnDeviceDisabledChecked(bool device_disabled); 135 void OnDeviceDisabledChecked(bool device_disabled);
136 136
137 TestingPrefServiceSimple local_state_; 137 TestingPrefServiceSimple local_state_;
138 138
139 content::TestBrowserThreadBundle thread_bundle_;
139 base::RunLoop run_loop_; 140 base::RunLoop run_loop_;
140 bool device_disabled_; 141 bool device_disabled_;
141 142
142 DISALLOW_COPY_AND_ASSIGN(DeviceDisablingManagerOOBETest); 143 DISALLOW_COPY_AND_ASSIGN(DeviceDisablingManagerOOBETest);
143 }; 144 };
144 145
145 DeviceDisablingManagerOOBETest::DeviceDisablingManagerOOBETest() 146 DeviceDisablingManagerOOBETest::DeviceDisablingManagerOOBETest()
146 : device_disabled_(false) { 147 : device_disabled_(false) {
147 EXPECT_CALL(*this, RestartToLoginScreen()).Times(0); 148 EXPECT_CALL(*this, RestartToLoginScreen()).Times(0);
148 EXPECT_CALL(*this, ShowDeviceDisabledScreen()).Times(0); 149 EXPECT_CALL(*this, ShowDeviceDisabledScreen()).Times(0);
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); 507 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation());
507 508
508 // Not enterprise owned, disabled by flag. 509 // Not enterprise owned, disabled by flag.
509 SetUnowned(); 510 SetUnowned();
510 EXPECT_FALSE( 511 EXPECT_FALSE(
511 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation()); 512 DeviceDisablingManager::HonorDeviceDisablingDuringNormalOperation());
512 } 513 }
513 514
514 } // namespace system 515 } // namespace system
515 } // namespace chromeos 516 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698