#include "chrome/browser/sharing/click_to_call/click_to_call_utils.h"
#include <memory>
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer.h"
#include "chrome/browser/sharing/sharing_service_factory.h"
#include "chrome/test/base/testing_profile.h"
#include "components/prefs/pref_service.h"
#include "components/sharing_message/features.h"
#include "components/sharing_message/mock_sharing_service.h"
#include "components/sharing_message/pref_names.h"
#include "components/sharing_message/sharing_fcm_handler.h"
#include "components/sharing_message/sharing_fcm_sender.h"
#include "components/sharing_message/sharing_handler_registry.h"
#include "components/sharing_message/sharing_service.h"
#include "components/sharing_message/sharing_sync_preference.h"
#include "components/sharing_message/vapid_key_manager.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
_;
ByMove;
Eq;
NiceMock;
Return;
SharingMessage;
namespace {
const char kEmptyTelUrl[] = …;
const char kTelUrl[] = …;
const char kNonTelUrl[] = …;
const char kSelectionTextWithNumber[] = …;
class ClickToCallUtilsTest : public testing::Test { … };
}
TEST_F(ClickToCallUtilsTest, NoSharingService_DoNotOfferAnyMenu) { … }
TEST_F(ClickToCallUtilsTest, PolicyDisabled_DoNotOfferAnyMenu) { … }
TEST_F(ClickToCallUtilsTest, IncognitoProfile_DoNotOfferAnyMenu) { … }
TEST_F(ClickToCallUtilsTest, EmptyTelLink_DoNotOfferForLink) { … }
TEST_F(ClickToCallUtilsTest, TelLink_OfferForLink) { … }
TEST_F(ClickToCallUtilsTest, NonTelLink_DoNotOfferForLink) { … }
TEST_F(ClickToCallUtilsTest, TelLinkWithFragment) { … }
TEST_F(ClickToCallUtilsTest, TelLinkWithEncodedCharacters) { … }
TEST_F(ClickToCallUtilsTest,
SelectionText_ValidPhoneNumberRegex_OfferForSelection) { … }
TEST_F(ClickToCallUtilsTest,
SelectionText_InvalidPhoneNumberRegex_DoNotOfferForSelection) { … }
TEST_F(ClickToCallUtilsTest, SelectionText_Length) { … }
TEST_F(ClickToCallUtilsTest, SelectionText_Digits) { … }
TEST_F(ClickToCallUtilsTest, IsUrlSafeForClickToCall) { … }