chromium/chrome/browser/notifications/scheduler/internal/display_decider_unittest.cc

// Copyright 2019 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/scheduler/internal/display_decider.h"

#include <map>
#include <memory>
#include <string>
#include <vector>

#include "base/strings/stringprintf.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "chrome/browser/notifications/scheduler/internal/notification_entry.h"
#include "chrome/browser/notifications/scheduler/internal/scheduler_config.h"
#include "chrome/browser/notifications/scheduler/public/notification_scheduler_types.h"
#include "chrome/browser/notifications/scheduler/test/fake_clock.h"
#include "chrome/browser/notifications/scheduler/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace notifications {
namespace {

// Initial state for test cases with a single registered client.
const std::vector<test::ImpressionTestData> kSingleClientImpressionTestData =;

const std::vector<test::ImpressionTestData> kClientsImpressionTestData =;

struct TestData {};

std::string DebugString(const DisplayDecider::Results& results) {}

class DisplayDeciderTest : public testing::Test {};

TEST_F(DisplayDeciderTest, NoNotification) {}

// Simple test case to verify new notifcaiton can be selected to show.
TEST_F(DisplayDeciderTest, PickOneNotification) {}

// Notification falls out of the target deliver time window will not be picked.
TEST_F(DisplayDeciderTest, OutOfDeliverTimeWindow) {}

// Picks a notification for the next client if possible.
// Rotation client type sequence:  kTest3 => kTest2 => kTest1
// The last shown type is kTest1. Expected to show for client kTest3.
TEST_F(DisplayDeciderTest, ClientRotation) {}

// After reaching maximum daily shown throttle, no notifications will be picked.
TEST_F(DisplayDeciderTest, ThrottleMaxDailyShowAllTypes) {}

// After reaching client's maximum daily shown throttle, notifications scheduled
// for this client will not be show.
TEST_F(DisplayDeciderTest, ThrottlePerClient) {}

// Client with suppression will not have notification shown.
TEST_F(DisplayDeciderTest, ThrottleSuppressedClient) {}

// Notifitions with NoThrottle Priority should always show.
TEST_F(DisplayDeciderTest, UnthrottlePriority) {}

}  // namespace
}  // namespace notifications