#include "base/test/scoped_feature_list.h"
#include "chrome/browser/ui/views/commerce/price_insights_icon_view.h"
#include "base/test/metrics/histogram_tester.h"
#include "chrome/browser/commerce/shopping_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_element_identifiers.h"
#include "chrome/browser/ui/commerce/commerce_ui_tab_helper.h"
#include "chrome/browser/ui/commerce/mock_commerce_ui_tab_helper.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/user_education/interactive_feature_promo_test.h"
#include "components/commerce/core/commerce_feature_list.h"
#include "components/commerce/core/mock_shopping_service.h"
#include "components/commerce/core/test_utils.h"
#include "components/feature_engagement/public/feature_constants.h"
#include "components/search/ntp_features.h"
#include "components/ukm/test_ukm_recorder.h"
#include "content/public/test/browser_test.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "ui/base/interaction/interactive_test.h"
namespace {
DEFINE_LOCAL_ELEMENT_IDENTIFIER_VALUE(…);
const char kShoppingURL[] = …;
const char kNonShoppingURL[] = …;
const char kProductClusterTitle[] = …;
std::unique_ptr<net::test_server::HttpResponse> BasicResponse(
const net::test_server::HttpRequest& request) { … }
}
class PriceInsightsIconViewInteractiveTest
: public InteractiveFeaturePromoTest { … };
IN_PROC_BROWSER_TEST_F(PriceInsightsIconViewInteractiveTest,
SidePanelShownOnPress) { … }
IN_PROC_BROWSER_TEST_F(PriceInsightsIconViewInteractiveTest,
IconIsNotHighlightedAfterClicking) { … }
class PriceInsightsIconViewEngagementTest
: public PriceInsightsIconViewInteractiveTest { … };
IN_PROC_BROWSER_TEST_F(PriceInsightsIconViewEngagementTest, ExpandedIconShown) { … }