// Copyright 2021 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/browser_list.h" #include <memory> #include <set> #include "base/memory/raw_ptr.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/test/base/browser_with_test_window_test.h" class BrowserListUnitTest : public BrowserWithTestWindowTest { … }; // This tests that minimized windows get added to the active list, at the front // the list. TEST_F(BrowserListUnitTest, TestMinimized) { … } // This tests that inactive windows do not get added to the active list. TEST_F(BrowserListUnitTest, TestInactive) { … } // This tests if the browser list is returning the correct browser reference // for the context provided as input. TEST_F(BrowserListUnitTest, TestFindBrowserWithUiElementContext) { … } // Class that tries to observe all pre-existing and newly created browsers. // Ensures that for each browser there is a single OnBrowserAdded/Removed call // or it already existed in BrowserList. class BrowserObserverChild : public BrowserListObserver, TabStripModelObserver { … }; // Class that creates BrowserObserverChild when a Browser is created; class BrowserObserverParent : public BrowserListObserver { … }; TEST_F(BrowserListUnitTest, ObserverAddedInFlight) { … }