chromium/chrome/browser/ui/search/ntp_user_data_logger_unittest.cc

// Copyright 2013 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/ui/search/ntp_user_data_logger.h"

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

#include "base/metrics/histogram.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/metrics/user_action_tester.h"
#include "base/time/time.h"
#include "chrome/browser/ui/search/ntp_user_data_types.h"
#include "chrome/common/search/ntp_logging_events.h"
#include "chrome/common/url_constants.h"
#include "components/favicon_base/favicon_types.h"
#include "components/ntp_tiles/constants.h"
#include "components/search/ntp_features.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

Bucket;
TileSource;
TileTitleSource;
TileVisualType;
ContainerEq;
ElementsAre;
IsEmpty;
SizeIs;

namespace {

constexpr int kUnknownTitleSource =;
constexpr int kManifestTitleSource =;
constexpr int kMetaTagTitleSource =;
constexpr int kTitleTagTitleSource =;
constexpr int kInferredTitleSource =;

Sample;
Samples;

// Helper function that uses sensible defaults for irrelevant fields of
// NTPTileImpression.
ntp_tiles::NTPTileImpression MakeNTPTileImpression(int index,
                                                   TileSource source,
                                                   TileTitleSource title_source,
                                                   TileVisualType visual_type) {}

// Helper function that populates a list of expected impressions, each with the
// expected |count|.
std::vector<base::Bucket> FillImpressions(int numImpressions, int count) {}

class TestNTPUserDataLogger : public NTPUserDataLogger {};

NTPUserDataLoggerTest;

MATCHER_P3(IsBucketBetween, lower_bound, upper_bound, count, "") {}

}  // namespace

TEST_F(NTPUserDataLoggerTest, ShouldRecordNumberOfTiles) {}

TEST_F(NTPUserDataLoggerTest, ShouldNotRecordImpressionsBeforeAllTilesLoaded) {}

TEST_F(NTPUserDataLoggerTest, ShouldRecordImpressions) {}

TEST_F(NTPUserDataLoggerTest, ShouldNotRecordRepeatedImpressions) {}

TEST_F(NTPUserDataLoggerTest, ShouldNotRecordImpressionsForBinsBeyondMax) {}

TEST_F(NTPUserDataLoggerTest, ShouldRecordNavigations) {}

TEST_F(NTPUserDataLoggerTest, ShouldRecordMostVisitedLoadTime) {}

TEST_F(NTPUserDataLoggerTest, ShouldRecordImpressionsAge) {}

TEST_F(NTPUserDataLoggerTest,
       ShouldNotRecordShortcutsAreCustomizedFromNTPOther) {}

TEST_F(NTPUserDataLoggerTest,
       ShouldNotRecordCustomizedShortcutSettingsFromNTPOther) {}

TEST_F(NTPUserDataLoggerTest, ShouldNotRecordCustomizationActionFromNTPOther) {}