#include "base/test/bind.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/side_search/side_search_tab_contents_helper.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/extensions/chrome_test_extension_loader.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/side_search/side_search_config.h"
#include "chrome/browser/ui/side_search/side_search_utils.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/interaction/interactive_browser_test.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/result_codes.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/common/extension.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/manifest.h"
#include "extensions/test/test_extension_dir.h"
#include "net/dns/mock_host_resolver.h"
#include "services/network/test/test_url_loader_factory.h"
#include "ui/base/interaction/element_identifier.h"
namespace {
DEFINE_LOCAL_ELEMENT_IDENTIFIER_VALUE(…);
constexpr char kSearchMatchPath[] = …;
constexpr char kNonMatchPath[] = …;
bool IsSearchURLMatch(const GURL& url) { … }
}
class SideSearchSideContentsHelperBrowsertest : public InteractiveBrowserTest { … };
class SideSearchExtensionsTest
: public SideSearchSideContentsHelperBrowsertest { … };
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
#define MAYBE_ContentScriptsExecuteInSidePanel …
#else
#define MAYBE_ContentScriptsExecuteInSidePanel …
#endif
IN_PROC_BROWSER_TEST_F(SideSearchExtensionsTest,
MAYBE_ContentScriptsExecuteInSidePanel) { … }
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
#define MAYBE_WebRequestInterceptsSidePanelNavigations …
#else
#define MAYBE_WebRequestInterceptsSidePanelNavigations …
#endif
IN_PROC_BROWSER_TEST_F(SideSearchExtensionsTest,
MAYBE_WebRequestInterceptsSidePanelNavigations) { … }
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX)
#define MAYBE_DeclarativeNetRequestInterceptsSidePanelNavigations …
#else
#define MAYBE_DeclarativeNetRequestInterceptsSidePanelNavigations …
#endif
IN_PROC_BROWSER_TEST_F(
SideSearchExtensionsTest,
MAYBE_DeclarativeNetRequestInterceptsSidePanelNavigations) { … }