#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/path_service.h"
#include "base/threading/thread_restrictions.h"
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/base/web_ui_test_data_source.h"
#include "components/guest_view/browser/guest_view_base.h"
#include "components/guest_view/browser/guest_view_manager_delegate.h"
#include "components/guest_view/browser/test_guest_view_manager.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "extensions/browser/api/extensions_api_client.h"
#include "extensions/browser/event_router.h"
#include "extensions/common/api/test.h"
#include "extensions/common/extension.h"
#include "extensions/common/mojom/context_type.mojom.h"
#include "extensions/test/extension_test_message_listener.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/resource/resource_bundle.h"
namespace extensions {
OnMessage;
namespace {
class ExtensionWebUITest : public ExtensionApiTest { … };
class ExtensionWebUIEmbeddedOptionsTest : public ExtensionWebUITest { … };
#if !BUILDFLAG(IS_WIN)
IN_PROC_BROWSER_TEST_F(ExtensionWebUITest, ConfidenceCheckAvailableAPIs) { … }
IN_PROC_BROWSER_TEST_F(ExtensionWebUITest, ConfidenceCheckUnavailableAPIs) { … }
IN_PROC_BROWSER_TEST_F(ExtensionWebUITest, SendMessage) { … }
IN_PROC_BROWSER_TEST_F(ExtensionWebUITest, OnMessage) { … }
IN_PROC_BROWSER_TEST_F(ExtensionWebUITest, RuntimeLastError) { … }
IN_PROC_BROWSER_TEST_F(ExtensionWebUITest, CanEmbedExtensionOptions) { … }
IN_PROC_BROWSER_TEST_F(ExtensionWebUIEmbeddedOptionsTest,
ExtensionOptionsCanAccessAppropriateAPIs) { … }
IN_PROC_BROWSER_TEST_F(ExtensionWebUIEmbeddedOptionsTest,
ExtensionOptionsExternalLinksOpenInNewTab) { … }
IN_PROC_BROWSER_TEST_F(ExtensionWebUITest, ReceivesExtensionOptionsOnClose) { … }
IN_PROC_BROWSER_TEST_F(ExtensionWebUITest, EmbedDisabledExtension) { … }
IN_PROC_BROWSER_TEST_F(ExtensionWebUITest, EmbedInvalidExtension) { … }
IN_PROC_BROWSER_TEST_F(ExtensionWebUITest, EmbedExtensionWithoutOptionsPage) { … }
class ExtensionWebUIListenersTest : public ExtensionWebUITest { … };
IN_PROC_BROWSER_TEST_F(ExtensionWebUIListenersTest, MultipleURLListeners) { … }
#endif
}
}