Commit d19453d0 authored by Jun Choi's avatar Jun Choi Committed by Commit Bot

Enable by-default support of CTAP2 devices

This CL changes chrome://enable-webauthentication-ctap2-support flag to
be enabled by default.

Bug: 798573
Change-Id: I0eb29e0cffacf88d6cccbc09281a713c1eab94c3
Reviewed-on: https://chromium-review.googlesource.com/1110547
Commit-Queue: Jun Choi <hongjunchoi@chromium.org>
Commit-Queue: Balazs Engedy <engedy@chromium.org>
Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Reviewed-by: default avatarKim Paulhamus <kpaulhamus@chromium.org>
Reviewed-by: default avatarBalazs Engedy <engedy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569432}
parent 938e0d2c
......@@ -969,18 +969,10 @@ IN_PROC_BROWSER_TEST_F(WebAuthJavascriptClientBrowserTest,
// WebAuthBrowserCtapTest ----------------------------------------------
// A test fixture that enables CTAP only flag.
class WebAuthBrowserCtapTest : public WebAuthLocalClientBrowserTest {
public:
WebAuthBrowserCtapTest() = default;
protected:
std::vector<base::Feature> GetFeaturesToEnable() override {
return {features::kWebAuth, device::kNewCtap2Device};
}
private:
base::test::ScopedFeatureList scoped_feature_list_;
~WebAuthBrowserCtapTest() override = default;
DISALLOW_COPY_AND_ASSIGN(WebAuthBrowserCtapTest);
};
......
......@@ -22,6 +22,6 @@ const base::Feature kNewblueDaemon{"Newblue",
#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
const base::Feature kNewCtap2Device{"WebAuthenticationCtap2",
base::FEATURE_DISABLED_BY_DEFAULT};
base::FEATURE_ENABLED_BY_DEFAULT};
} // namespace device
......@@ -53,8 +53,8 @@ class FidoGetAssertionHandlerTest : public ::testing::Test {
std::move(request_param), get_assertion_cb_.callback());
}
void InitFeatureListWithCtapFlag() {
scoped_feature_list_.InitAndEnableFeature(kNewCtap2Device);
void InitFeatureListAndDisableCtapFlag() {
scoped_feature_list_.InitAndDisableFeature(kNewCtap2Device);
}
test::FakeFidoDiscovery* discovery() const { return discovery_; }
......@@ -72,7 +72,6 @@ class FidoGetAssertionHandlerTest : public ::testing::Test {
};
TEST_F(FidoGetAssertionHandlerTest, TestGetAssertionRequestOnSingleDevice) {
InitFeatureListWithCtapFlag();
auto request_handler = CreateGetAssertionHandler();
discovery()->WaitForCallToStartAndSimulateSuccess();
auto device = std::make_unique<MockFidoDevice>();
......@@ -95,7 +94,6 @@ TEST_F(FidoGetAssertionHandlerTest, TestGetAssertionRequestOnSingleDevice) {
// Test a scenario where the connected authenticator is a U2F device.
TEST_F(FidoGetAssertionHandlerTest, TestU2fSign) {
InitFeatureListWithCtapFlag();
auto request_handler = CreateGetAssertionHandler();
discovery()->WaitForCallToStartAndSimulateSuccess();
......@@ -120,6 +118,7 @@ TEST_F(FidoGetAssertionHandlerTest, TestU2fSign) {
// Test a scenario where the connected authenticator is a U2F device and
// "WebAuthenticationCtap2" flag is not enabled.
TEST_F(FidoGetAssertionHandlerTest, TestU2fSignWithoutCtapFlag) {
InitFeatureListAndDisableCtapFlag();
auto request_handler = CreateGetAssertionHandler();
discovery()->WaitForCallToStartAndSimulateSuccess();
......
......@@ -40,7 +40,6 @@ class FidoGetAssertionTaskTest : public testing::Test {
public:
FidoGetAssertionTaskTest() {
scoped_feature_list_.emplace();
scoped_feature_list_->InitAndEnableFeature(kNewCtap2Device);
}
TestGetAssertionTaskCallbackReceiver& get_assertion_callback_receiver() {
......
......@@ -61,8 +61,8 @@ class FidoMakeCredentialHandlerTest : public ::testing::Test {
cb_.callback());
}
void InitFeatureListWithCtapFlag() {
scoped_feature_list_.InitAndEnableFeature(kNewCtap2Device);
void InitFeatureListAndDisableCtapFlag() {
scoped_feature_list_.InitAndDisableFeature(kNewCtap2Device);
}
test::FakeFidoDiscovery* discovery() const { return discovery_; }
......@@ -78,7 +78,6 @@ class FidoMakeCredentialHandlerTest : public ::testing::Test {
};
TEST_F(FidoMakeCredentialHandlerTest, TestCtap2MakeCredentialWithFlagEnabled) {
InitFeatureListWithCtapFlag();
auto request_handler = CreateMakeCredentialHandler();
discovery()->WaitForCallToStartAndSimulateSuccess();
......@@ -99,7 +98,6 @@ TEST_F(FidoMakeCredentialHandlerTest, TestCtap2MakeCredentialWithFlagEnabled) {
// Test a scenario where the connected authenticator is a U2F device.
TEST_F(FidoMakeCredentialHandlerTest, TestU2fRegisterWithFlagEnabled) {
InitFeatureListWithCtapFlag();
auto request_handler = CreateMakeCredentialHandler();
discovery()->WaitForCallToStartAndSimulateSuccess();
......@@ -120,6 +118,7 @@ TEST_F(FidoMakeCredentialHandlerTest, TestU2fRegisterWithFlagEnabled) {
// Test a scenario where the connected authenticator is a U2F device using a
// logic that defaults to handling U2F devices.
TEST_F(FidoMakeCredentialHandlerTest, TestU2fRegisterWithoutFlagEnabled) {
InitFeatureListAndDisableCtapFlag();
auto request_handler = CreateMakeCredentialHandler();
discovery()->WaitForCallToStartAndSimulateSuccess();
......
......@@ -40,7 +40,6 @@ class FidoMakeCredentialTaskTest : public testing::Test {
public:
FidoMakeCredentialTaskTest() {
scoped_feature_list_.emplace();
scoped_feature_list_->InitAndEnableFeature(kNewCtap2Device);
}
std::unique_ptr<MakeCredentialTask> CreateMakeCredentialTask(
......
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