chromium/chrome/browser/supervised_user/supervised_user_incognito_browsertest.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/browser_process.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_list_observer.h"
#include "chrome/test/supervised_user/supervision_mixin.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace {

class AllIncognitoBrowsersClosedWaiter : public BrowserListObserver {};

class SupervisedUserIncognitoBrowserTest
    : public MixinBasedInProcessBrowserTest,
      public ::testing::WithParamInterface<
          supervised_user::SupervisionMixin::SignInMode> {};

// ChromeOS Ash does not support the browser being signed out on a supervised
// device.
#if !BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(SupervisedUserIncognitoBrowserTest,
                       UnsupervisedSignInDoesNotCloseIncognito) {}

IN_PROC_BROWSER_TEST_F(SupervisedUserIncognitoBrowserTest,
                       SupervisedSignInClosesIncognito) {}
#endif  // !BUILDFLAG(IS_CHROMEOS_ASH)

}  // namespace