chromium/chrome/browser/upgrade_detector/build_state_unittest.cc

// Copyright 2020 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/upgrade_detector/build_state.h"

#include <optional>

#include "base/version.h"
#include "chrome/browser/upgrade_detector/mock_build_state_observer.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

AllOf;
Eq;
IsFalse;
IsTrue;
Property;

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

// Observers are not notified when there's no update.
TEST_F(BuildStateTest, SetUpdateNoUpdate) {}

// Observers are notified upon update when the version couldn't be fetched.
TEST_F(BuildStateTest, SetUpdateWithNoVersion) {}

// Observers are notified upon update and the version is held.
TEST_F(BuildStateTest, SetUpdateWithVersion) {}

// Observers are notified upon update with a critical version and both versions
// are held.
TEST_F(BuildStateTest, SetUpdateWithCritical) {}

// Observers are only notified once for duplicate calls.
TEST_F(BuildStateTest, TwoUpdatesOnceNotification) {}