Index: chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc |
diff --git a/chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc b/chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc |
index 660f6f4ccc02096e258f3c069df98d4ccac64be4..a6aa46ec6ecb02019e5fe31c994421f5a3898b11 100644 |
--- a/chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc |
+++ b/chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc |
@@ -20,7 +20,6 @@ |
#include "chromeos/cryptohome/mock_async_method_caller.h" |
#include "chromeos/dbus/fake_cryptohome_client.h" |
#include "chromeos/settings/cros_settings_names.h" |
-#include "chromeos/system/mock_statistics_provider.h" |
#include "content/public/test/test_browser_thread.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -131,18 +130,11 @@ class PlatformVerificationFlowTest : public ::testing::Test { |
// Configure a user for the mock user manager. |
mock_user_manager_.SetActiveUser(kTestEmail); |
- // Configure the statistics provider to report verified mode. |
- EXPECT_CALL(mock_statistics_provider_, |
- GetMachineStatistic(system::kDevSwitchBootMode, _)) |
- .WillRepeatedly(DoAll(SetArgumentPointee<1>(std::string("0")), |
- Return(true))); |
- |
// Create a verifier for tests to call. |
verifier_.reset(new PlatformVerificationFlow(&mock_attestation_flow_, |
&mock_async_caller_, |
&fake_cryptohome_client_, |
&mock_user_manager_, |
- &mock_statistics_provider_, |
&fake_delegate_)); |
// Create callbacks for tests to use with verifier_. |
@@ -250,7 +242,6 @@ class PlatformVerificationFlowTest : public ::testing::Test { |
cryptohome::MockAsyncMethodCaller mock_async_caller_; |
CustomFakeCryptohomeClient fake_cryptohome_client_; |
MockUserManager mock_user_manager_; |
- system::MockStatisticsProvider mock_statistics_provider_; |
FakeDelegate fake_delegate_; |
TestingPrefServiceSimple pref_service_; |
CrosSettingsProvider* device_settings_provider_; |
@@ -402,54 +393,5 @@ TEST_F(PlatformVerificationFlowTest, FastCheck) { |
EXPECT_TRUE(check_state_result_); |
} |
-TEST_F(PlatformVerificationFlowTest, FastCheckNoStat) { |
- // Configure the stats provider to fail. |
- EXPECT_CALL(mock_statistics_provider_, |
- GetMachineStatistic(system::kDevSwitchBootMode, _)) |
- .WillRepeatedly(Return(false)); |
- |
- verifier_->CheckPlatformState(check_state_callback_); |
- base::RunLoop().RunUntilIdle(); |
- EXPECT_FALSE(check_state_result_); |
-} |
- |
-TEST_F(PlatformVerificationFlowTest, FastCheckStatDevMode) { |
- // Configure the stats provider to fail. |
- EXPECT_CALL(mock_statistics_provider_, |
- GetMachineStatistic(system::kDevSwitchBootMode, _)) |
- .WillRepeatedly(DoAll(SetArgumentPointee<1>(std::string("1")), |
- Return(true))); |
- |
- verifier_->CheckPlatformState(check_state_callback_); |
- base::RunLoop().RunUntilIdle(); |
- EXPECT_FALSE(check_state_result_); |
-} |
- |
-TEST_F(PlatformVerificationFlowTest, FastCheckStatInvalidMode) { |
- // Configure the stats provider to fail. |
- EXPECT_CALL(mock_statistics_provider_, |
- GetMachineStatistic(system::kDevSwitchBootMode, _)) |
- .WillRepeatedly(DoAll(SetArgumentPointee<1>(std::string("INVALID")), |
- Return(true))); |
- |
- verifier_->CheckPlatformState(check_state_callback_); |
- base::RunLoop().RunUntilIdle(); |
- EXPECT_FALSE(check_state_result_); |
-} |
- |
-TEST_F(PlatformVerificationFlowTest, FastCheckNoAttestation) { |
- fake_cryptohome_client_.set_attestation_prepared(false); |
- verifier_->CheckPlatformState(check_state_callback_); |
- base::RunLoop().RunUntilIdle(); |
- EXPECT_FALSE(check_state_result_); |
-} |
- |
-TEST_F(PlatformVerificationFlowTest, FastCheckDBusFailure) { |
- fake_cryptohome_client_.set_call_status(DBUS_METHOD_CALL_FAILURE); |
- verifier_->CheckPlatformState(check_state_callback_); |
- base::RunLoop().RunUntilIdle(); |
- EXPECT_FALSE(check_state_result_); |
-} |
- |
} // namespace attestation |
} // namespace chromeos |