#include "chrome/browser/sharing/shared_clipboard/remote_copy_message_handler.h"
#include <map>
#include <string>
#include "base/functional/callback_helpers.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/uuid.h"
#include "build/build_config.h"
#include "chrome/browser/notifications/notification_display_service_tester.h"
#include "chrome/browser/sharing/shared_clipboard/shared_clipboard_test_base.h"
#include "chrome/browser/sharing/sharing_service_factory.h"
#include "chrome/grit/generated_resources.h"
#include "chrome/test/base/testing_profile.h"
#include "components/sharing_message/mock_sharing_service.h"
#include "components/sharing_message/proto/remote_copy_message.pb.h"
#include "components/sharing_message/proto/sharing_message.pb.h"
#include "components/sharing_message/shared_clipboard/remote_copy_handle_message_result.h"
#include "components/sync/protocol/sync_enums.pb.h"
#include "content/public/test/url_loader_interceptor.h"
#include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/clipboard/clipboard_monitor.h"
#include "ui/base/clipboard/clipboard_observer.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/codec/png_codec.h"
#include "ui/gfx/image/image_unittest_util.h"
#include "ui/gfx/skia_util.h"
#include "ui/message_center/public/cpp/notification.h"
namespace {
const char kText[] = …;
const char kEmptyDeviceName[] = …;
const char kDeviceNameInMessage[] = …;
const char16_t kDeviceNameInMessage16[] = …;
const char kTestImageUrl[] = …;
class ClipboardObserver : public ui::ClipboardObserver { … };
}
class RemoteCopyMessageHandlerTest : public SharedClipboardTestBase { … };
TEST_F(RemoteCopyMessageHandlerTest, NotificationWithoutDeviceName) { … }
TEST_F(RemoteCopyMessageHandlerTest, NotificationWithDeviceName) { … }
TEST_F(RemoteCopyMessageHandlerTest, IsImageSourceAllowed) { … }
TEST_F(RemoteCopyMessageHandlerTest, HandleImage) { … }