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

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

Issue 397793002: Eliminate CreateBooleanValue from test files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad merge Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/system/automatic_reboot_manager.h" 5 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 const base::TimeDelta& uptime) { 386 const base::TimeDelta& uptime) {
387 update_reboot_needed_uptime_ = uptime; 387 update_reboot_needed_uptime_ = uptime;
388 SaveUptimeToFile(update_reboot_needed_uptime_file_, uptime); 388 SaveUptimeToFile(update_reboot_needed_uptime_file_, uptime);
389 } 389 }
390 390
391 391
392 void AutomaticRebootManagerBasicTest::SetRebootAfterUpdate( 392 void AutomaticRebootManagerBasicTest::SetRebootAfterUpdate(
393 bool reboot_after_update, 393 bool reboot_after_update,
394 bool expect_reboot) { 394 bool expect_reboot) {
395 reboot_after_update_ = reboot_after_update; 395 reboot_after_update_ = reboot_after_update;
396 local_state_.SetManagedPref( 396 local_state_.SetManagedPref(prefs::kRebootAfterUpdate,
397 prefs::kRebootAfterUpdate, 397 new base::FundamentalValue(reboot_after_update));
398 base::Value::CreateBooleanValue(reboot_after_update));
399 task_runner_->RunUntilIdle(); 398 task_runner_->RunUntilIdle();
400 EXPECT_EQ(expect_reboot ? 1 : 0, 399 EXPECT_EQ(expect_reboot ? 1 : 0,
401 power_manager_client_->num_request_restart_calls()); 400 power_manager_client_->num_request_restart_calls());
402 } 401 }
403 402
404 void AutomaticRebootManagerBasicTest::SetUptimeLimit( 403 void AutomaticRebootManagerBasicTest::SetUptimeLimit(
405 const base::TimeDelta& limit, 404 const base::TimeDelta& limit,
406 bool expect_reboot) { 405 bool expect_reboot) {
407 uptime_limit_ = limit; 406 uptime_limit_ = limit;
408 if (limit == base::TimeDelta()) { 407 if (limit == base::TimeDelta()) {
(...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after
2054 INSTANTIATE_TEST_CASE_P( 2053 INSTANTIATE_TEST_CASE_P(
2055 AutomaticRebootManagerTestInstance, 2054 AutomaticRebootManagerTestInstance,
2056 AutomaticRebootManagerTest, 2055 AutomaticRebootManagerTest,
2057 ::testing::Values( 2056 ::testing::Values(
2058 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_LOGIN_SCREEN, 2057 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_LOGIN_SCREEN,
2059 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_KIOSK_APP_SESSION, 2058 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_KIOSK_APP_SESSION,
2060 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_NON_KIOSK_APP_SESSION)); 2059 AUTOMATIC_REBOOT_MANAGER_TEST_SCENARIO_NON_KIOSK_APP_SESSION));
2061 2060
2062 } // namespace system 2061 } // namespace system
2063 } // namespace chromeos 2062 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698