chromium/chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker_unittest.cc

// Copyright 2023 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/picture_in_picture/picture_in_picture_occlusion_tracker.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/picture_in_picture/picture_in_picture_occlusion_observer.h"
#include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h"
#include "chrome/browser/picture_in_picture/scoped_picture_in_picture_occlusion_observation.h"
#include "chrome/test/views/chrome_views_test_base.h"
#include "media/base/media_switches.h"
#include "testing/gmock/include/gmock/gmock.h"

namespace {

_;
Invoke;

class MockPictureInPictureOcclusionObserver
    : public PictureInPictureOcclusionObserver {};

class PictureInPictureOcclusionTrackerTest : public ChromeViewsTestBase {};

TEST_F(PictureInPictureOcclusionTrackerTest,
       NotifiesObserversWhenEitherWidgetMoves) {}

TEST_F(PictureInPictureOcclusionTrackerTest,
       InvisiblePictureInPictureWidgetsDontOcclude) {}

TEST_F(PictureInPictureOcclusionTrackerTest,
       UpdatesOcclusionStateWhenWidgetMovesDueToParentMoving) {}

TEST_F(PictureInPictureOcclusionTrackerTest, MultipleObserversForOneWidget) {}

TEST_F(PictureInPictureOcclusionTrackerTest,
       ChildOfPictureInPictureWidgetIsntOccluded) {}

// Regression test for https://crbug.com/1509371.
TEST_F(PictureInPictureOcclusionTrackerTest, ObserveTwiceDoesNotCrash) {}

// Regression test for https://crbug/com/353039531.
TEST_F(PictureInPictureOcclusionTrackerTest,
       SynchronouslyReobservingDoesNotCrash) {}

}  // namespace