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

Unified Diff: chrome/browser/chromeos/policy/device_status_collector_browsertest.cc

Issue 871013004: Don't do auto-enrollment if the write protect switch is off. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gperftools_prof_timer
Patch Set: Fix mistake in test adjustment. Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/device_status_collector_browsertest.cc
diff --git a/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc b/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc
index 178c3bae958f62d354bbddfbc5a9815340864280..38e3478e97323246d47c21e758bab7229e1b256b 100644
--- a/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc
+++ b/chrome/browser/chromeos/policy/device_status_collector_browsertest.cc
@@ -593,7 +593,9 @@ TEST_F(DeviceStatusCollectorTest, ActivityTimesKeptUntilSubmittedSuccessfully) {
TEST_F(DeviceStatusCollectorTest, DevSwitchBootMode) {
// Test that boot mode data is reported by default.
- fake_statistics_provider_.SetMachineStatistic("devsw_boot", "0");
+ fake_statistics_provider_.SetMachineStatistic(
+ chromeos::system::kDevSwitchBootKey,
+ chromeos::system::kDevSwitchBootValueVerified);
GetStatus();
EXPECT_EQ("Verified", status_.boot_mode());
@@ -607,19 +609,25 @@ TEST_F(DeviceStatusCollectorTest, DevSwitchBootMode) {
// statistics provider returns valid data.
cros_settings_->SetBoolean(chromeos::kReportDeviceBootMode, true);
- fake_statistics_provider_.SetMachineStatistic("devsw_boot", "(error)");
+ fake_statistics_provider_.SetMachineStatistic(
+ chromeos::system::kDevSwitchBootKey, "(error)");
GetStatus();
EXPECT_FALSE(status_.has_boot_mode());
- fake_statistics_provider_.SetMachineStatistic("devsw_boot", " ");
+ fake_statistics_provider_.SetMachineStatistic(
+ chromeos::system::kDevSwitchBootKey, " ");
GetStatus();
EXPECT_FALSE(status_.has_boot_mode());
- fake_statistics_provider_.SetMachineStatistic("devsw_boot", "0");
+ fake_statistics_provider_.SetMachineStatistic(
+ chromeos::system::kDevSwitchBootKey,
+ chromeos::system::kDevSwitchBootValueVerified);
GetStatus();
EXPECT_EQ("Verified", status_.boot_mode());
- fake_statistics_provider_.SetMachineStatistic("devsw_boot", "1");
+ fake_statistics_provider_.SetMachineStatistic(
+ chromeos::system::kDevSwitchBootKey,
+ chromeos::system::kDevSwitchBootValueDev);
GetStatus();
EXPECT_EQ("Dev", status_.boot_mode());
}

Powered by Google App Engine
This is Rietveld 408576698