Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: cc/test/layer_test_common.h

Issue 19106007: cc: Allow the main thread to cancel commits (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 { \ 8 #define EXPECT_SET_NEEDS_COMMIT(expect, code_to_test) \
9 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times((expect)); \ 9 do { \
10 code_to_test; \ 10 EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times((expect)); \
11 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \ 11 code_to_test; \
12 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \
13 } while (false)
14
15 #define EXPECT_SET_NEEDS_UPDATE(expect, code_to_test) \
16 do { \
17 EXPECT_CALL(*layer_tree_host_, SetNeedsUpdateLayers()).Times((expect)); \
18 code_to_test; \
19 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); \
12 } while (false) 20 } while (false)
13 21
14 namespace gfx { class Rect; } 22 namespace gfx { class Rect; }
15 23
16 namespace cc { 24 namespace cc {
17 class QuadList; 25 class QuadList;
18 26
19 class LayerTestCommon { 27 class LayerTestCommon {
20 public: 28 public:
21 static const char* quad_string; 29 static const char* quad_string;
22 30
23 static void VerifyQuadsExactlyCoverRect(const cc::QuadList& quads, 31 static void VerifyQuadsExactlyCoverRect(const cc::QuadList& quads,
24 gfx::Rect rect); 32 gfx::Rect rect);
25 }; 33 };
26 34
27 } // namespace cc 35 } // namespace cc
28 36
29 #endif // CC_TEST_LAYER_TEST_COMMON_H_ 37 #endif // CC_TEST_LAYER_TEST_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698