Flutter Engine
The Flutter Engine
mock_window_surface.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_EGL_MOCK_WINDOW_SURFACE_H_
6#define FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_EGL_MOCK_WINDOW_SURFACE_H_
7
8#include "flutter/fml/macros.h"
9#include "flutter/shell/platform/windows/egl/window_surface.h"
10#include "gmock/gmock.h"
11
12namespace flutter {
13namespace testing {
14namespace egl {
15
16/// Mock for the |WindowSurface| base class.
18 public:
20 : WindowSurface(EGL_NO_DISPLAY, EGL_NO_CONTEXT, EGL_NO_SURFACE, 0, 0) {}
21
22 MOCK_METHOD(bool, IsValid, (), (const, override));
23 MOCK_METHOD(bool, Destroy, (), (override));
24 MOCK_METHOD(bool, MakeCurrent, (), (const, override));
25 MOCK_METHOD(bool, SwapBuffers, (), (const, override));
26 MOCK_METHOD(bool, SetVSyncEnabled, (bool), (override));
27
28 private:
29 FML_DISALLOW_COPY_AND_ASSIGN(MockWindowSurface);
30};
31
32} // namespace egl
33} // namespace testing
34} // namespace flutter
35
36#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_EGL_MOCK_WINDOW_SURFACE_H_
virtual bool IsValid() const
Definition: surface.cc:19
virtual bool SwapBuffers() const
Definition: surface.cc:59
virtual bool Destroy()
Definition: surface.cc:23
virtual bool MakeCurrent() const
Definition: surface.cc:50
virtual bool SetVSyncEnabled(bool enabled)
Mock for the |WindowSurface| base class.
MOCK_METHOD(bool, SetVSyncEnabled,(bool),(override))
MOCK_METHOD(bool, SwapBuffers,(),(const, override))
MOCK_METHOD(bool, MakeCurrent,(),(const, override))
MOCK_METHOD(bool, Destroy,(),(override))
MOCK_METHOD(bool, IsValid,(),(const, override))