#include "components/optimization_guide/core/optimization_hints_component_update_listener.h"
#include <memory>
#include <string>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "base/version.h"
#include "components/optimization_guide/core/hints_component_info.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace optimization_guide {
const base::FilePath::CharType kFileName1[] = …);
const base::FilePath::CharType kFileName2[] = …);
class TestObserver : public OptimizationHintsComponentObserver { … };
class OptimizationHintsComponentUpdateListenerTest : public testing::Test { … };
TEST_F(OptimizationHintsComponentUpdateListenerTest,
ProcessHintsIssuesNotification) { … }
TEST_F(OptimizationHintsComponentUpdateListenerTest,
ProcessHintsNewVersionProcessed) { … }
TEST_F(OptimizationHintsComponentUpdateListenerTest,
ProcessHintsPastVersionIgnored) { … }
TEST_F(OptimizationHintsComponentUpdateListenerTest,
ProcessHintsSameVersionIgnored) { … }
TEST_F(OptimizationHintsComponentUpdateListenerTest,
UnregisteredObserverDoesNotReceiveNotification) { … }
TEST_F(OptimizationHintsComponentUpdateListenerTest,
RegisteredObserverReceivesNotificationForCurrentComponent) { … }
}