#include <memory>
#include <string>
#include <utility>
#include "base/files/file_path.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/path_service.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.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/extensions/scoped_test_mv2_enabler.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_window.h"
#include "chrome/browser/ui/extensions/extension_enable_flow.h"
#include "chrome/browser/ui/extensions/extension_enable_flow_test_delegate.h"
#include "chrome/browser/ui/supervised_user/parent_permission_dialog.h"
#include "chrome/browser/ui/test/test_browser_dialog.h"
#include "chrome/browser/ui/views/supervised_user/parent_permission_dialog_view.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/fake_gaia_mixin.h"
#include "chrome/test/base/mixin_based_in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/supervised_user/supervision_mixin.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 "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/fake_gaia.h"
#include "google_apis/gaia/gaia_auth_consumer.h"
class ExtensionEnableFlowTestSupervised
: public MixinBasedInProcessBrowserTest,
public TestParentPermissionDialogViewObserver { … };
IN_PROC_BROWSER_TEST_F(ExtensionEnableFlowTestSupervised,
ParentPermissionDialogAccept) { … }
IN_PROC_BROWSER_TEST_F(ExtensionEnableFlowTestSupervised,
ParentPermissionDialogCancel) { … }
IN_PROC_BROWSER_TEST_F(ExtensionEnableFlowTestSupervised,
ParentBlockedExtensionEnable) { … }
class ExtensionManagementApiTestSupervised
: public ExtensionEnableFlowTestSupervised { … };
IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTestSupervised,
PRE_ParentPermissionGrantedForEnable) { … }
IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTestSupervised,
ParentPermissionGrantedForEnable) { … }
IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTestSupervised,
PRE_ParentPermissionNotGrantedForEnable) { … }
IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTestSupervised,
ParentPermissionNotGrantedForEnable) { … }
IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTestSupervised,
PRE_ParentBlockedExtensionEnable) { … }
IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTestSupervised,
ParentBlockedExtensionEnable) { … }