#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ref.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_timeouts.h"
#include "chrome/browser/cart/cart_service.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/chrome_test_utils.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/commerce/core/proto/cart_db_content.pb.h"
#include "components/network_session_configurator/common/network_switches.h"
#include "components/optimization_guide/core/optimization_guide_features.h"
#include "components/prefs/pref_service.h"
#include "components/search/ntp_features.h"
#include "components/session_proto_db/session_proto_db.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 "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "ui/base/window_open_disposition.h"
namespace {
cart_db::ChromeCartContentProto BuildProto(const char* domain,
const char* merchant_url) { … }
const char kFakeMerchantA[] = …;
const char kFakeMerchantURLA[] = …;
const char kFakeMerchantURLB[] = …;
const char kMockMerchant[] = …;
const char kMockMerchantURL[] = …;
ShoppingCarts;
}
std::unique_ptr<net::test_server::HttpResponse> BasicResponse(
const net::test_server::HttpRequest& request) { … }
class CartServiceBrowserTest : public InProcessBrowserTest { … };
IN_PROC_BROWSER_TEST_F(CartServiceBrowserTest, TestNotShowSkippedMerchants) { … }
IN_PROC_BROWSER_TEST_F(CartServiceBrowserTest, TestNavigationUKMCollection) { … }
class FakeCartDiscountLinkFetcher : public CartDiscountLinkFetcher { … };
class CartServiceBrowserDiscountTest : public CartServiceBrowserTest { … };
IN_PROC_BROWSER_TEST_F(CartServiceBrowserDiscountTest,
DISABLED_LoadDiscountInCurrentTab) { … }