#include "chrome/browser/ui/views/supervised_user/parent_permission_dialog_view.h"
#include <memory>
#include <optional>
#include <ostream>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "base/functional/callback_forward.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ref.h"
#include "base/memory/scoped_refptr.h"
#include "base/notreached.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/gtest_util.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/metrics/user_action_tester.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/chrome_test_extension_loader.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/supervised_user/supervised_user_extensions_delegate_impl.h"
#include "chrome/browser/supervised_user/supervised_user_extensions_metrics_recorder.h"
#include "chrome/browser/supervised_user/supervised_user_service_factory.h"
#include "chrome/browser/supervised_user/supervised_user_test_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/supervised_user/parent_permission_dialog.h"
#include "chrome/browser/ui/test/test_browser_dialog.h"
#include "chrome/test/base/mixin_based_in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/interaction/interactive_browser_test.h"
#include "chrome/test/supervised_user/supervision_mixin.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/signin/public/identity_manager/identity_test_environment.h"
#include "components/supervised_user/core/browser/supervised_user_service.h"
#include "components/supervised_user/core/common/features.h"
#include "components/supervised_user/core/common/supervised_user_constants.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_launcher.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/disable_reason.h"
#include "extensions/browser/extension_dialog_auto_confirm.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/extension_util.h"
#include "extensions/common/extension_builder.h"
#include "extensions/test/result_catcher.h"
#include "google_apis/gaia/gaia_auth_consumer.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/views/window/dialog_client_view.h"
std::ostream& operator<<(std::ostream& os,
ParentPermissionDialog::Result result) { … }
namespace {
enum class ActionStatus { … };
std::string NameFromTestCase() { … }
class ParentPermissionDialogViewHarness
: public TestParentPermissionDialogViewObserver { … };
class ParentPermissionDialogViewTest
: public SupportsTestDialog<
InteractiveBrowserTestT<MixinBasedInProcessBrowserTest>> { … };
IN_PROC_BROWSER_TEST_F(ParentPermissionDialogViewTest, InvokeUi_default) { … }
IN_PROC_BROWSER_TEST_F(ParentPermissionDialogViewTest, InvokeUi_extension) { … }
IN_PROC_BROWSER_TEST_F(ParentPermissionDialogViewTest,
PermissionReceived_default) { … }
IN_PROC_BROWSER_TEST_F(ParentPermissionDialogViewTest,
PermissionFailedInvalidPassword_default) { … }
IN_PROC_BROWSER_TEST_F(ParentPermissionDialogViewTest,
PermissionDialogCanceled_default) { … }
IN_PROC_BROWSER_TEST_F(ParentPermissionDialogViewTest,
PermissionReceived_extension) { … }
IN_PROC_BROWSER_TEST_F(ParentPermissionDialogViewTest,
PermissionFailedInvalidPassword_extension) { … }
IN_PROC_BROWSER_TEST_F(ParentPermissionDialogViewTest,
PermissionFailedInvalidPasswordWithRepromt_extension) { … }
IN_PROC_BROWSER_TEST_F(ParentPermissionDialogViewTest,
PermissionDialogCanceled_extension) { … }
enum class ExtensionsManagingToggle : int { … };
class ParentPermissionInputSectionLabelTest
: public ParentPermissionDialogViewTest,
public ::testing::WithParamInterface<ExtensionsManagingToggle> { … };
IN_PROC_BROWSER_TEST_P(ParentPermissionInputSectionLabelTest,
PermissionReceived_extension) { … }
IN_PROC_BROWSER_TEST_P(ParentPermissionInputSectionLabelTest,
PermissionReceived_default) { … }
INSTANTIATE_TEST_SUITE_P(…);
}