Flutter Engine
The Flutter Engine
mock_context.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_CONTEXT_H_
6#define FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_EGL_MOCK_CONTEXT_H_
7
8#include "flutter/fml/macros.h"
9#include "flutter/shell/platform/windows/egl/context.h"
10#include "gmock/gmock.h"
11
12namespace flutter {
13namespace testing {
14namespace egl {
15
16/// Mock for the |Context| base class.
18 public:
19 MockContext() : Context(EGL_NO_DISPLAY, EGL_NO_CONTEXT) {}
20
21 MOCK_METHOD(bool, MakeCurrent, (), (const, override));
22 MOCK_METHOD(bool, ClearCurrent, (), (const, override));
23
24 private:
25 FML_DISALLOW_COPY_AND_ASSIGN(MockContext);
26};
27
28} // namespace egl
29} // namespace testing
30} // namespace flutter
31
32#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_TESTING_EGL_MOCK_CONTEXT_H_
virtual bool ClearCurrent() const
Definition: context.cc:40
virtual bool MakeCurrent() const
Definition: context.cc:29
Mock for the |Context| base class.
Definition: mock_context.h:17
MOCK_METHOD(bool, ClearCurrent,(),(const, override))
MOCK_METHOD(bool, MakeCurrent,(),(const, override))