Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
canvas_test.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_TESTING_CANVAS_TEST_H_
6#define FLUTTER_TESTING_CANVAS_TEST_H_
7
8#include "flutter/fml/macros.h"
9#include "flutter/testing/mock_canvas.h"
10#include "gtest/gtest.h"
12
13namespace flutter {
14namespace testing {
15
16// This fixture allows creating tests that make use of a mock |SkCanvas|.
17template <typename BaseT>
18class CanvasTestBase : public BaseT {
19 public:
20 CanvasTestBase() = default;
21
22 MockCanvas& mock_canvas() { return canvas_; }
23 sk_sp<SkColorSpace> mock_color_space() { return color_space_; }
24
25 private:
26 MockCanvas canvas_;
28
30};
32
33} // namespace testing
34} // namespace flutter
35
36#endif // FLUTTER_TESTING_CANVAS_TEST_H_
static sk_sp< SkColorSpace > MakeSRGB()
sk_sp< SkColorSpace > mock_color_space()
Definition canvas_test.h:23
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27