chromium/chrome/browser/ui/views/tabs/tab_hover_card_controller_unittest.cc

// 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/views/tabs/tab_hover_card_controller.h"

#include "base/memory/scoped_refptr.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/ui/performance_controls/memory_saver_chip_tab_helper.h"
#include "chrome/browser/ui/thumbnails/thumbnail_image.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/frame/test_with_browser_view.h"
#include "chrome/browser/ui/views/tabs/tab_hover_card_thumbnail_observer.h"
#include "chrome/browser/ui/views/tabs/tab_strip.h"
#include "chrome/common/pref_names.h"
#include "components/memory_pressure/fake_memory_pressure_monitor.h"

// These are regression tests for possible crashes.

class TabHoverCardControllerTest : public TestWithBrowserView {};

TEST_F(TabHoverCardControllerTest, ShowWrongTabDoesntCrash) {}

TEST_F(TabHoverCardControllerTest, SetPreviewWithNoHoverCardDoesntCrash) {}

TEST_F(TabHoverCardControllerTest, ShowPreviewsForTab) {}

TEST_F(TabHoverCardControllerTest, DisablePreviewsForTab) {}

TEST_F(TabHoverCardControllerTest, HidePreviewsForDiscardedTab) {}

TEST_F(TabHoverCardControllerTest, DisableMemoryUsageForTab) {}

class TestThumbnailImageDelegate : public ThumbnailImage::Delegate {};

TEST_F(TabHoverCardControllerTest, ShowPreviewsForDiscardedTabWithThumbnail) {}

TEST_F(TabHoverCardControllerTest, DontCaptureUnderCriticalMemoryPressure) {}

class TabHoverCardPreviewsEnabledPrefTest : public TestWithBrowserView {};

TEST_F(TabHoverCardPreviewsEnabledPrefTest, DefaultState) {}