Commit 48b423df authored by Roman Sorokin's avatar Roman Sorokin Committed by Commit Bot

Add users count check for device local accounts test

TBR=antrim@chromium.org

Fixed: 949239
Change-Id: If390e8e653dff58b9c33d3bd871cdcf6d1ad67a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144181Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Commit-Queue: Roman Sorokin [CET] <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758398}
parent 8627750f
...@@ -204,13 +204,7 @@ IN_PROC_BROWSER_TEST_F(DeviceLoginScreenPolicyBrowsertest, ...@@ -204,13 +204,7 @@ IN_PROC_BROWSER_TEST_F(DeviceLoginScreenPolicyBrowsertest,
// Tests that enabling/disabling public accounts correctly reflects in the login // Tests that enabling/disabling public accounts correctly reflects in the login
// UI. // UI.
IN_PROC_BROWSER_TEST_F(DeviceLoginScreenPolicyBrowsertest, DeviceLocalAccount) { IN_PROC_BROWSER_TEST_F(DeviceLoginScreenPolicyBrowsertest, DeviceLocalAccount) {
chromeos::OobeScreenWaiter(chromeos::GaiaView::kScreenId).Wait(); EXPECT_TRUE(ash::LoginScreenTestApi::IsOobeDialogVisible());
// Wait for Gaia dialog to be open.
chromeos::test::TestPredicateWaiter(base::BindRepeating([]() {
return ash::LoginScreenTestApi::IsOobeDialogVisible();
})).Wait();
em::ChromeDeviceSettingsProto& proto(device_policy()->payload()); em::ChromeDeviceSettingsProto& proto(device_policy()->payload());
auto* account = proto.mutable_device_local_accounts()->add_account(); auto* account = proto.mutable_device_local_accounts()->add_account();
account->set_account_id("test"); account->set_account_id("test");
...@@ -222,6 +216,7 @@ IN_PROC_BROWSER_TEST_F(DeviceLoginScreenPolicyBrowsertest, DeviceLocalAccount) { ...@@ -222,6 +216,7 @@ IN_PROC_BROWSER_TEST_F(DeviceLoginScreenPolicyBrowsertest, DeviceLocalAccount) {
chromeos::test::TestPredicateWaiter(base::BindRepeating([]() { chromeos::test::TestPredicateWaiter(base::BindRepeating([]() {
return !ash::LoginScreenTestApi::IsOobeDialogVisible(); return !ash::LoginScreenTestApi::IsOobeDialogVisible();
})).Wait(); })).Wait();
EXPECT_EQ(ash::LoginScreenTestApi::GetUsersCount(), 1);
proto.clear_device_local_accounts(); proto.clear_device_local_accounts();
RefreshDevicePolicy(); RefreshDevicePolicy();
......
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