chromium/chrome/browser/notifications/notification_platform_bridge_linux_unittest.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/notifications/notification_platform_bridge_linux.h"

#include <dbus/dbus-shared.h>

#include <memory>
#include <vector>

#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/i18n/number_formatting.h"
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_refptr.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/notifications/notification_display_service_tester.h"
#include "chrome/browser/notifications/notification_test_util.h"
#include "chrome/common/notifications/notification_operation.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "components/dbus/thread_linux/dbus_thread_linux.h"
#include "content/public/test/test_utils.h"
#include "dbus/mock_bus.h"
#include "dbus/mock_object_proxy.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/re2/src/re2/re2.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_unittest_util.h"
#include "ui/message_center/public/cpp/notification.h"
#include "ui/message_center/public/cpp/notification_delegate.h"

ButtonInfo;
Notification;
SettingsButtonHandler;
_;
ByMove;
Return;
StrictMock;

namespace {

const char kFreedesktopNotificationsName[] =;
const char kFreedesktopNotificationsPath[] =;

class NotificationBuilder {};

struct NotificationRequest {};

struct TestParams {};

NotificationRequest ParseRequest(dbus::MethodCall* method_call) {}

std::unique_ptr<dbus::Response> GetIdResponse(uint32_t id) {}

ACTION_P2(OnGetServerInformation, server_name, server_version) {}

ACTION_P(RegisterSignalCallback, callback_addr) {}

ACTION_P2(OnNotify, verifier, id) {}

ACTION(OnCloseNotification) {}

ACTION_P(OnNotificationBridgeReady, success) {}

// Matches a method call to the specified dbus target.
MATCHER_P(Calls, member, "") {}

}  // namespace

class NotificationPlatformBridgeLinuxTest : public BrowserWithTestWindowTest {};

TEST_F(NotificationPlatformBridgeLinuxTest, SetUpAndTearDown) {}

TEST_F(NotificationPlatformBridgeLinuxTest, NotifyAndCloseFormat) {}

TEST_F(NotificationPlatformBridgeLinuxTest, ProgressPercentageAddedToSummary) {}

TEST_F(NotificationPlatformBridgeLinuxTest, NotificationListItemsInBody) {}

TEST_F(NotificationPlatformBridgeLinuxTest, NotificationTimeoutsNoPersistence) {}

TEST_F(NotificationPlatformBridgeLinuxTest,
       NotificationTimeoutWithPersistence) {}

TEST_F(NotificationPlatformBridgeLinuxTest, NotificationImages) {}

TEST_F(NotificationPlatformBridgeLinuxTest, NotificationAttribution) {}

TEST_F(NotificationPlatformBridgeLinuxTest, NotificationAttributionKde) {}

TEST_F(NotificationPlatformBridgeLinuxTest, MissingActionsCapability) {}

TEST_F(NotificationPlatformBridgeLinuxTest, MissingBodyCapability) {}

TEST_F(NotificationPlatformBridgeLinuxTest, EscapeHtml) {}

TEST_F(NotificationPlatformBridgeLinuxTest, Silent) {}

TEST_F(NotificationPlatformBridgeLinuxTest, OriginUrlFormat) {}

TEST_F(NotificationPlatformBridgeLinuxTest,
       OldCinnamonNotificationsHaveClosebutton) {}

TEST_F(NotificationPlatformBridgeLinuxTest,
       NewCinnamonNotificationsDontHaveClosebutton) {}

TEST_F(NotificationPlatformBridgeLinuxTest, NoSettingsButton) {}

TEST_F(NotificationPlatformBridgeLinuxTest, DefaultButtonForwards) {}

TEST_F(NotificationPlatformBridgeLinuxTest, SettingsButtonForwards) {}

TEST_F(NotificationPlatformBridgeLinuxTest, ActionButtonForwards) {}

TEST_F(NotificationPlatformBridgeLinuxTest, CloseButtonForwards) {}

TEST_F(NotificationPlatformBridgeLinuxTest, NotificationRepliedForwards) {}