#include "content/browser/screen_orientation/screen_orientation_provider.h"
#include <optional>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "content/public/browser/screen_orientation_delegate.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/test/test_render_view_host.h"
#include "content/test/test_web_contents.h"
#include "third_party/blink/public/mojom/frame/fullscreen.mojom.h"
namespace content {
ScreenOrientationLockResult;
namespace {
class FakeScreenOrientationDelegate : public ScreenOrientationDelegate { … };
class FakeWebContentsDelegate : public WebContentsDelegate { … };
void LockResultCallback(std::optional<ScreenOrientationLockResult>* out_result,
ScreenOrientationLockResult result) { … }
}
class ScreenOrientationProviderTest : public RenderViewHostImplTestHarness { … };
TEST_F(ScreenOrientationProviderTest, DelegateNotAvailableLockOnce) { … }
TEST_F(ScreenOrientationProviderTest, DelegateLockOnce) { … }
TEST_F(ScreenOrientationProviderTest, DelegateRequireFullScreenLockOnce) { … }
TEST_F(ScreenOrientationProviderTest, DelegateLockThenUnlock) { … }
TEST_F(ScreenOrientationProviderTest, DelegateLockThenLock) { … }
TEST_F(ScreenOrientationProviderTest, NoUnlockWithoutLock) { … }
TEST_F(ScreenOrientationProviderTest, UnlockWhenExitingFullScreen) { … }
TEST_F(ScreenOrientationProviderTest, UnlockWhenNavigation) { … }
TEST_F(ScreenOrientationProviderTest,
DelegateRequireDisplayModeFullScreenLockOnce) { … }
}