0

Enable CRD unattended feature flags by default.

The following feature flags are enabled by default:
* EnableAutoApproveEnterpriseSharedSessions
* EnableCrdSharedSessionToUnattendedDevice

Bug: b:390164145
Change-Id: Idd7d84f01ae8fab97283e35759bd676ef50d27ea
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6397021
Reviewed-by: Joe Downing <joedow@chromium.org>
Commit-Queue: Ashutosh Singhal <macinashutosh@google.com>
Reviewed-by: Jeroen Dhollander <jeroendh@google.com>
Cr-Commit-Position: refs/heads/main@{#1439670}
This commit is contained in:
Ashutosh Singhal 2025-03-28 13:28:30 -07:00 committed by Chromium LUCI CQ
parent 139ea1511f
commit bc86ea7a96
3 changed files with 20 additions and 63 deletions

@ -223,9 +223,6 @@ class DeviceCommandFetchCrdAvailabilityInfoJobTestParameterizedOverSessionType
CrdSessionAvailability GetExpectedRemoteSupportAvailabilityFor(
TestSessionType session_type) {
switch (session_type) {
// TODO(b:393521569) Update session availability on default enabled state
// for CRD unattended feature flag.
case TestSessionType::kNoSession:
case TestSessionType::kGuestSession:
case TestSessionType::kUnaffiliatedUserSession:
return CrdSessionAvailability::
@ -237,6 +234,7 @@ class DeviceCommandFetchCrdAvailabilityInfoJobTestParameterizedOverSessionType
case TestSessionType::kAutoLaunchedKioskSession:
case TestSessionType::kManagedGuestSession:
case TestSessionType::kAffiliatedUserSession:
case TestSessionType::kNoSession:
return CrdSessionAvailability::AVAILABLE;
}
}
@ -310,15 +308,15 @@ TEST_F(DeviceCommandFetchCrdAvailabilityInfoJobTest,
}
TEST_F(DeviceCommandFetchCrdAvailabilityInfoJobTest,
AllowRemoteSupportSessionAtLoginScreenIfEnabledByFeatureFlag) {
DontAllowRemoteSupportSessionAtLoginScreenIfDisabledByFeatureFlag) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(kEnableCrdSharedSessionToUnattendedDevice);
feature_list.InitAndDisableFeature(kEnableCrdSharedSessionToUnattendedDevice);
StartSessionOfType(TestSessionType::kNoSession);
Result result = CreateAndRunJob();
EXPECT_EQ(ParseJsonDict(result.payload).FindInt("remoteSupportAvailability"),
CrdSessionAvailability::AVAILABLE);
CrdSessionAvailability::UNAVAILABLE_UNSUPPORTED_USER_SESSION_TYPE);
}
TEST_P(DeviceCommandFetchCrdAvailabilityInfoJobTestParameterizedOverSessionType,
@ -371,7 +369,10 @@ TEST_P(DeviceCommandFetchCrdAvailabilityInfoJobTestParameterizedOverSessionType,
const base::Value::List expected = [&]() {
switch (session_type) {
case TestSessionType::kNoSession:
return ToList({CrdSessionType::REMOTE_ACCESS_SESSION});
return ToList({
CrdSessionType::REMOTE_SUPPORT_SESSION,
CrdSessionType::REMOTE_ACCESS_SESSION,
});
case TestSessionType::kManuallyLaunchedWebKioskSession:
case TestSessionType::kManuallyLaunchedKioskSession:
@ -428,12 +429,12 @@ TEST_P(DeviceCommandFetchCrdAvailabilityInfoJobTestParameterizedOverSessionType,
const CrdSessionAvailability expected = [&]() {
switch (session_type) {
case TestSessionType::kNoSession:
case TestSessionType::kGuestSession:
case TestSessionType::kUnaffiliatedUserSession:
return CrdSessionAvailability::
UNAVAILABLE_UNSUPPORTED_USER_SESSION_TYPE;
case TestSessionType::kNoSession:
case TestSessionType::kManuallyLaunchedWebKioskSession:
case TestSessionType::kManuallyLaunchedKioskSession:
case TestSessionType::kAutoLaunchedWebKioskSession:

@ -143,13 +143,11 @@ bool SupportsRemoteSupport(TestSessionType user_session_type) {
case TestSessionType::kAutoLaunchedKioskSession:
case TestSessionType::kManagedGuestSession:
case TestSessionType::kAffiliatedUserSession:
case TestSessionType::kNoSession:
return true;
case TestSessionType::kGuestSession:
case TestSessionType::kUnaffiliatedUserSession:
// TODO(b:393521569) Update session type supported on default enabled
// state for CRD unattended feature flag.
case TestSessionType::kNoSession:
return false;
}
}
@ -446,13 +444,11 @@ TEST_P(DeviceCommandStartCrdSessionJobTestParameterized,
case TestSessionType::kAutoLaunchedKioskSession:
case TestSessionType::kManagedGuestSession:
case TestSessionType::kAffiliatedUserSession:
case TestSessionType::kNoSession:
return true;
case TestSessionType::kGuestSession:
case TestSessionType::kUnaffiliatedUserSession:
// TODO(b:393521569) Update session type supported on default enabled
// state for CRD unattended feature flag.
case TestSessionType::kNoSession:
return false;
}
}();
@ -483,13 +479,11 @@ TEST_P(DeviceCommandStartCrdSessionJobTestParameterized,
case TestSessionType::kAutoLaunchedKioskSession:
case TestSessionType::kManagedGuestSession:
case TestSessionType::kAffiliatedUserSession:
case TestSessionType::kNoSession:
return true;
case TestSessionType::kGuestSession:
case TestSessionType::kUnaffiliatedUserSession:
case TestSessionType::kNoSession:
// TODO(b:393521569) Update session type supported on default enabled
// state for CRD unattended feature flag.
return false;
}
}();
@ -661,15 +655,16 @@ TEST_P(DeviceCommandStartCrdSessionJobTestBoolParameterized,
}
TEST_F(DeviceCommandStartCrdSessionJobTest,
AllowRemoteSupportSessionAtLoginScreenIfEnabledByFeatureFlag) {
EnableFeature(kEnableCrdSharedSessionToUnattendedDevice);
DontAllowRemoteSupportSessionAtLoginScreenIfDisabledByFeatureFlag) {
DisableFeature(kEnableCrdSharedSessionToUnattendedDevice);
StartSessionOfType(TestSessionType::kNoSession);
Result result = RunJobAndWaitForResult(
Payload().Set("crdSessionType", CrdSessionType::REMOTE_SUPPORT_SESSION));
EXPECT_SUCCESS(result);
EXPECT_ERROR(result,
StartCrdSessionResultCode::FAILURE_UNSUPPORTED_USER_TYPE);
}
TEST_F(DeviceCommandStartCrdSessionJobTest,
@ -705,13 +700,11 @@ TEST_P(DeviceCommandStartCrdSessionJobTestParameterized,
case TestSessionType::kManagedGuestSession:
case TestSessionType::kAffiliatedUserSession:
case TestSessionType::kNoSession:
return false;
case TestSessionType::kGuestSession:
case TestSessionType::kUnaffiliatedUserSession:
// TODO(b:393521569) Update session type supported on default enabled
// state for CRD unattended feature flag.
case TestSessionType::kNoSession:
// Unsupported session types
NOTREACHED();
}
@ -742,17 +735,6 @@ TEST_P(DeviceCommandStartCrdSessionJobTestParameterized,
EXPECT_FALSE(delegate().session_parameters().terminate_upon_input);
}
TEST_F(DeviceCommandStartCrdSessionJobTest,
ShouldNotTerminateUponInputForRemoteSupportAtLoginScreen) {
EnableFeature(kEnableCrdSharedSessionToUnattendedDevice);
StartSessionOfType(TestSessionType::kNoSession);
Result result = RunJobAndWaitForResult();
EXPECT_SUCCESS(result);
EXPECT_FALSE(delegate().session_parameters().terminate_upon_input);
}
TEST_P(DeviceCommandStartCrdSessionJobTestParameterized,
TestShowConfirmationDialogForRemoteSupport) {
TestSessionType user_session_type = GetParam();
@ -777,13 +759,11 @@ TEST_P(DeviceCommandStartCrdSessionJobTestParameterized,
case TestSessionType::kManagedGuestSession:
case TestSessionType::kAffiliatedUserSession:
case TestSessionType::kNoSession:
return true;
case TestSessionType::kGuestSession:
case TestSessionType::kUnaffiliatedUserSession:
// TODO(b:393521569) Update session type supported on default enabled
// state for CRD unattended feature flag.
case TestSessionType::kNoSession:
// Unsupported session types
NOTREACHED();
}
@ -807,7 +787,6 @@ TEST_F(DeviceCommandStartCrdSessionJobTest,
TEST_F(DeviceCommandStartCrdSessionJobTest,
TestConnectionAutoApproveTimeoutForSharedSessions) {
EnableFeature(kAutoApproveEnterpriseSharedSessions);
AddActiveManagedNetwork();
SetDeviceIdleTime(kAutoApproveDeviceIdlenessCutoff);
@ -846,7 +825,6 @@ TEST_F(DeviceCommandStartCrdSessionJobTest,
TEST_F(
DeviceCommandStartCrdSessionJobTest,
ShouldNotSetConnectionAutoApproveTimeoutIfDeviceIsIdleMoreThanTheCutoff) {
EnableFeature(kAutoApproveEnterpriseSharedSessions);
AddActiveManagedNetwork();
SetDeviceIdleTime(kAutoApproveDeviceIdlenessCutoff + 1);
@ -861,7 +839,6 @@ TEST_F(
TEST_F(
DeviceCommandStartCrdSessionJobTest,
ShouldNotSetConnectionAutoApproveTimeoutIfDeviceIsNotConnectedToManagedNetwork) {
EnableFeature(kAutoApproveEnterpriseSharedSessions);
SetDeviceIdleTime(kAutoApproveDeviceIdlenessCutoff);
LogInAsAffiliatedUser();
@ -1300,16 +1277,6 @@ TEST_F(DeviceCommandStartCrdSessionJobRemoteAccessTest,
EXPECT_FALSE(delegate().session_parameters().terminate_upon_input);
}
TEST_F(DeviceCommandStartCrdSessionJobRemoteAccessTest,
ShouldNotTerminateUponInputEvenIfEnabledByCrdUnattendedFeatureFlag) {
EnableFeature(kEnableCrdSharedSessionToUnattendedDevice);
AddActiveManagedNetwork();
EXPECT_SUCCESS(RunJobAndWaitForResult());
EXPECT_FALSE(delegate().session_parameters().terminate_upon_input);
}
TEST_F(DeviceCommandStartCrdSessionJobRemoteAccessTest,
ShouldNotShowConfirmationDialog) {
AddActiveManagedNetwork();
@ -1318,16 +1285,6 @@ TEST_F(DeviceCommandStartCrdSessionJobRemoteAccessTest,
EXPECT_FALSE(delegate().session_parameters().show_confirmation_dialog);
}
TEST_F(DeviceCommandStartCrdSessionJobRemoteAccessTest,
ShouldNotShowConfirmationDialogEvenIfEnabledByCrdUnattendedFeatureFlag) {
EnableFeature(kEnableCrdSharedSessionToUnattendedDevice);
AddActiveManagedNetwork();
EXPECT_SUCCESS(RunJobAndWaitForResult(RemoteAccessPayload()));
EXPECT_FALSE(delegate().session_parameters().show_confirmation_dialog);
}
TEST_F(DeviceCommandStartCrdSessionJobRemoteAccessTest,
ShouldNotLimitSessionDuration) {
AddActiveManagedNetwork();
@ -1340,7 +1297,6 @@ TEST_F(DeviceCommandStartCrdSessionJobRemoteAccessTest,
TEST_F(DeviceCommandStartCrdSessionJobRemoteAccessTest,
ShouldNotSetConnectionAutoApproveTimeout) {
EnableFeature(kAutoApproveEnterpriseSharedSessions);
AddActiveManagedNetwork();
SetDeviceIdleTime(kAutoApproveDeviceIdlenessCutoff);

@ -18,10 +18,10 @@ BASE_FEATURE(kEnableCrdFileTransferForKiosk,
BASE_FEATURE(kEnableCrdSharedSessionToUnattendedDevice,
"EnableCrdSharedSessionToUnattendedDevice",
base::FEATURE_DISABLED_BY_DEFAULT);
base::FEATURE_ENABLED_BY_DEFAULT);
BASE_FEATURE(kAutoApproveEnterpriseSharedSessions,
"EnableAutoApproveEnterpriseSharedSessions",
base::FEATURE_DISABLED_BY_DEFAULT);
base::FEATURE_ENABLED_BY_DEFAULT);
} // namespace remoting::features