#include "chrome/browser/ui/commerce/discounts_page_action_controller.h"
#include "base/run_loop.h"
#include "base/test/mock_callback.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/time/default_clock.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 "url/gurl.h"
namespace commerce {
namespace {
const char kShoppingURL[] = …;
const char kShoppingURLDomain[] = …;
}
class DiscountsPageActionControllerUnittest : public testing::Test { … };
TEST_F(DiscountsPageActionControllerUnittest, ShouldShowIcon) { … }
TEST_F(DiscountsPageActionControllerUnittest, ShouldNotShowIcon_NoDiscounts) { … }
TEST_F(DiscountsPageActionControllerUnittest, ShouldNotShowIcon_NoEligible) { … }
TEST_F(DiscountsPageActionControllerUnittest, ShouldExpandIcon_ShoppyPageOff) { … }
TEST_F(DiscountsPageActionControllerUnittest,
ShouldExpandIcon_ShoppyPageOn_OnNonVisitedDomain) { … }
TEST_F(DiscountsPageActionControllerUnittest,
ShouldExpandIcon_ShoppyPageOn_OnBubbleAutoShown) { … }
TEST_F(DiscountsPageActionControllerUnittest,
ShouldNotExpandIcon_ShoppyPageOn_OnVisitedDomain) { … }
TEST_F(DiscountsPageActionControllerUnittest, ShouldNotAutoShow) { … }
TEST_F(DiscountsPageActionControllerUnittest, ShouldAlwaysAutoShow) { … }
TEST_F(DiscountsPageActionControllerUnittest, ShouldAutoShowOnce) { … }
}