Commit 4f81fc3f authored by Leo Lai's avatar Leo Lai Committed by Commit Bot

fake attestation flow used in browser test

This CL replaces the complex object construction of AttestationFlow with
FakeAttestationFlow because the consumers of fake attestation flow
doesn't care about the details.

The CL was validated by browser_tests.

BUG=b:158955123

Change-Id: Ida31a3c933ecac639fe86ff9ba62e610e26d2a29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2297063Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
Commit-Queue: Leo Lai <cylai@google.com>
Cr-Commit-Position: refs/heads/master@{#789821}
parent c5202ddd
......@@ -12,9 +12,7 @@
#include "chrome/browser/chromeos/login/test/fake_gaia_mixin.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h"
#include "chromeos/attestation/mock_attestation_flow.h"
#include "chromeos/cryptohome/async_method_caller.h"
#include "chromeos/dbus/cryptohome/fake_cryptohome_client.h"
#include "chromeos/attestation/fake_attestation_flow.h"
#include "chromeos/system/fake_statistics_provider.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/cloud/policy_builder.h"
......@@ -161,10 +159,7 @@ void LocalPolicyTestServerMixin::SetFakeAttestationFlow() {
->browser_policy_connector_chromeos()
->GetDeviceCloudPolicyInitializer()
->SetAttestationFlowForTesting(
std::make_unique<chromeos::attestation::AttestationFlow>(
cryptohome::AsyncMethodCaller::GetInstance(),
chromeos::FakeCryptohomeClient::Get(),
std::make_unique<chromeos::attestation::FakeServerProxy>()));
std::make_unique<chromeos::attestation::FakeAttestationFlow>());
}
bool LocalPolicyTestServerMixin::SetDeviceStateRetrievalResponse(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment