summaryrefslogtreecommitdiffstats
path: root/cc/test/layer_test_common.h
blob: 94e2f2a9824907eacac6363fe5b9ad45f6d77bfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CC_TEST_LAYER_TEST_COMMON_H_
#define CC_TEST_LAYER_TEST_COMMON_H_

#define EXPECT_SET_NEEDS_COMMIT(expect, code_to_test) do {                \
    EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times((expect));   \
    code_to_test;                                                         \
    Mock::VerifyAndClearExpectations(layer_tree_host_.get());           \
  } while (false)

namespace gfx { class Rect; }

namespace cc {
class QuadList;

class LayerTestCommon {
 public:
  static const char* quad_string;

  static void VerifyQuadsExactlyCoverRect(const cc::QuadList& quads,
                                          gfx::Rect rect);
};

}  // namespace cc

#endif  // CC_TEST_LAYER_TEST_COMMON_H_