| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 
 | // Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_HATS_MOCK_HATS_SERVICE_H_
#define CHROME_BROWSER_UI_HATS_MOCK_HATS_SERVICE_H_
#include <memory>
#include "chrome/browser/ui/hats/hats_service_desktop.h"
#include "content/public/browser/web_contents.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace content {
class BrowserContext;
}
class KeyedService;
class Profile;
class MockHatsService : public HatsServiceDesktop {
 public:
  explicit MockHatsService(Profile* profile);
  ~MockHatsService() override;
  MOCK_METHOD(void,
              LaunchSurvey,
              (const std::string& trigger,
               base::OnceClosure success_callback,
               base::OnceClosure failure_callback,
               (const SurveyBitsData&)survey_specific_bits_data,
               (const SurveyStringData&)survey_specific_string_data,
               (const std::optional<std::string>&)supplied_trigger_id,
               (const SurveyOptions&)survey_options),
              (override));
  MOCK_METHOD(void,
              LaunchSurveyForWebContents,
              (const std::string& trigger,
               (content::WebContents*)web_contents,
               (const SurveyBitsData&)survey_specific_bits_data,
               (const SurveyStringData&)survey_specific_string_data,
               base::OnceClosure success_callback,
               base::OnceClosure failure_callback,
               const std::optional<std::string>& supplied_trigger_id,
               const HatsService::SurveyOptions& survey_options),
              (override));
  MOCK_METHOD(bool,
              LaunchDelayedSurvey,
              (const std::string& trigger,
               int timeout_ms,
               (const SurveyBitsData&)survey_specific_bits_data,
               (const SurveyStringData&)survey_specific_string_data),
              (override));
  MOCK_METHOD(bool,
              LaunchDelayedSurveyForWebContents,
              (const std::string& trigger,
               content::WebContents* web_contents,
               int timeout_ms,
               (const SurveyBitsData&)survey_specific_bits_data,
               (const SurveyStringData&)survey_specific_string_data,
               (HatsService::NavigationBehavior)navigation_behavior,
               base::OnceClosure success_callback,
               base::OnceClosure failure_callback,
               const std::optional<std::string>& supplied_trigger_id,
               const HatsService::SurveyOptions& survey_options),
              (override));
  MOCK_METHOD(void, HatsNextDialogClosed, (), (override));
  MOCK_METHOD(bool, CanShowAnySurvey, (bool user_prompted), (const override));
};
std::unique_ptr<KeyedService> BuildMockHatsService(
    content::BrowserContext* context);
#endif  // CHROME_BROWSER_UI_HATS_MOCK_HATS_SERVICE_H_
 |