| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_TEST_LAYER_TEST_COMMON_H_ | 5 #ifndef CC_TEST_LAYER_TEST_COMMON_H_ |
| 6 #define CC_TEST_LAYER_TEST_COMMON_H_ | 6 #define CC_TEST_LAYER_TEST_COMMON_H_ |
| 7 | 7 |
| 8 #define EXPECT_SET_NEEDS_COMMIT(expect, code_to_test) do { \ |
| 9 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times((expect)); \ |
| 10 code_to_test; \ |
| 11 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \ |
| 12 } while (false) |
| 13 |
| 8 namespace gfx { class Rect; } | 14 namespace gfx { class Rect; } |
| 9 | 15 |
| 10 namespace cc { | 16 namespace cc { |
| 11 class QuadList; | 17 class QuadList; |
| 12 | 18 |
| 13 class LayerTestCommon { | 19 class LayerTestCommon { |
| 14 public: | 20 public: |
| 15 static const char* quad_string; | 21 static const char* quad_string; |
| 16 | 22 |
| 17 static void VerifyQuadsExactlyCoverRect(const cc::QuadList& quads, | 23 static void VerifyQuadsExactlyCoverRect(const cc::QuadList& quads, |
| 18 gfx::Rect rect); | 24 gfx::Rect rect); |
| 19 }; | 25 }; |
| 20 | 26 |
| 21 } // namespace cc | 27 } // namespace cc |
| 22 | 28 |
| 23 #endif // CC_TEST_LAYER_TEST_COMMON_H_ | 29 #endif // CC_TEST_LAYER_TEST_COMMON_H_ |
| OLD | NEW |