chromium/components/safe_browsing/content/browser/triggers/trigger_manager_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 "components/safe_browsing/content/browser/triggers/trigger_manager.h"

#include "base/run_loop.h"
#include "base/test/scoped_feature_list.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/testing_pref_service.h"
#include "components/safe_browsing/content/browser/threat_details.h"
#include "components/safe_browsing/content/browser/triggers/trigger_throttler.h"
#include "components/safe_browsing/core/common/features.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_web_contents_factory.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
Key;
Return;
UnorderedElementsAre;

namespace safe_browsing {

// Mock ThreatDetails class that makes FinishCollection a no-op.
class MockThreatDetails : public ThreatDetails {};

class MockThreatDetailsFactory : public ThreatDetailsFactory {};

class MockTriggerThrottler : public TriggerThrottler {};

class TriggerManagerTest : public ::testing::Test {};

TEST_F(TriggerManagerTest, StartAndFinishCollectingThreatDetails) {}

TEST_F(TriggerManagerTest, NoDataCollection_Incognito) {}

TEST_F(TriggerManagerTest, NoDataCollection_SBEROptInDisallowed) {}

TEST_F(TriggerManagerTest, NoDataCollection_IncognitoAndSBEROptInDisallowed) {}

TEST_F(TriggerManagerTest, UserOptedOutOfSBER_DataCollected_NoReportSent) {}

TEST_F(TriggerManagerTest, UserOptsOutOfSBER_DataCollected_NoReportSent) {}

TEST_F(TriggerManagerTest, UserOptsInToSBER_DataCollected_ReportSent) {}

TEST_F(TriggerManagerTest,
       SBEROptInBecomesDisallowed_DataCollected_NoReportSent) {}

TEST_F(TriggerManagerTest, NoCollectionWhenOutOfQuota) {}

TEST_F(TriggerManagerTest, NoCollectionWhenSBERDisabledByPolicy) {}

TEST_F(TriggerManagerTest, AdSamplerTrigger) {}

TEST_F(TriggerManagerTest, AdSamplerTrigger_Incognito) {}
}  // namespace safe_browsing