| Index: chrome/browser/chromeos/login/supervised/supervised_user_creation_browsertest.cc
|
| diff --git a/chrome/browser/chromeos/login/supervised/supervised_user_creation_browsertest.cc b/chrome/browser/chromeos/login/supervised/supervised_user_creation_browsertest.cc
|
| index d0b0e410e99776f683003aaf202fcfb8ea9f9e71..782198a079e8e1d396c90098c3e7b0bc2d6c0688 100644
|
| --- a/chrome/browser/chromeos/login/supervised/supervised_user_creation_browsertest.cc
|
| +++ b/chrome/browser/chromeos/login/supervised/supervised_user_creation_browsertest.cc
|
| @@ -4,6 +4,9 @@
|
|
|
| #include <string>
|
|
|
| +#include "ash/common/system/status_area_widget.h"
|
| +#include "ash/common/system/web_notification/web_notification_tray.h"
|
| +#include "ash/test/status_area_widget_test_helper.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/macros.h"
|
| #include "base/run_loop.h"
|
| @@ -41,6 +44,16 @@ using chromeos::kTestManager;
|
|
|
| namespace chromeos {
|
|
|
| +namespace {
|
| +
|
| +bool GetWebNotificationTrayVisibility() {
|
| + return ash::StatusAreaWidgetTestHelper::GetStatusAreaWidget()
|
| + ->web_notification_tray()
|
| + ->visible();
|
| +}
|
| +
|
| +} // anonymous namespace
|
| +
|
| class SupervisedUserCreationTest : public SupervisedUserTestBase {
|
| public:
|
| SupervisedUserCreationTest() : SupervisedUserTestBase() {}
|
| @@ -184,6 +197,38 @@ IN_PROC_BROWSER_TEST_F(SupervisedUserTransactionCleanupTest,
|
| JSEvalOrExitBrowser("$('supervised-user-creation').cancel()");
|
| }
|
|
|
| +IN_PROC_BROWSER_TEST_F(SupervisedUserCreationTest,
|
| + PRE_PRE_PRE_CheckNoNotificationTray) {
|
| + PrepareUsers();
|
| +}
|
| +
|
| +IN_PROC_BROWSER_TEST_F(SupervisedUserCreationTest,
|
| + PRE_PRE_CheckNoNotificationTray) {
|
| + // Before sign-in, the tray should not be visible.
|
| + EXPECT_FALSE(GetWebNotificationTrayVisibility());
|
| +
|
| + StartFlowLoginAsManager();
|
| +
|
| + // On supervised user creation flow, the tray should not be visible.
|
| + EXPECT_FALSE(GetWebNotificationTrayVisibility());
|
| +
|
| + FillNewUserData(kTestSupervisedUserDisplayName);
|
| + StartUserCreation("supervised-user-creation-next-button",
|
| + kTestSupervisedUserDisplayName);
|
| +}
|
| +
|
| +IN_PROC_BROWSER_TEST_F(SupervisedUserCreationTest,
|
| + PRE_CheckNoNotificationTray) {
|
| + SigninAsSupervisedUser(true, 0, kTestSupervisedUserDisplayName);
|
| +
|
| + // After sign-in, the tray should be visible.
|
| + EXPECT_TRUE(GetWebNotificationTrayVisibility());
|
| +}
|
| +
|
| +IN_PROC_BROWSER_TEST_F(SupervisedUserCreationTest, CheckNoNotificationTray) {
|
| + RemoveSupervisedUser(3, 0, kTestSupervisedUserDisplayName);
|
| +}
|
| +
|
| IN_PROC_BROWSER_TEST_(
|
| SupervisedUserTransactionCleanupTest,
|
| CreateAndCancelSupervisedUser,
|
|
|