diff options
Diffstat (limited to 'cc/test')
-rw-r--r-- | cc/test/layer_tree_pixel_test.cc | 19 | ||||
-rw-r--r-- | cc/test/layer_tree_pixel_test.h | 1 | ||||
-rw-r--r-- | cc/test/layer_tree_test.h | 36 |
3 files changed, 41 insertions, 15 deletions
diff --git a/cc/test/layer_tree_pixel_test.cc b/cc/test/layer_tree_pixel_test.cc index 94fce72..70e6223 100644 --- a/cc/test/layer_tree_pixel_test.cc +++ b/cc/test/layer_tree_pixel_test.cc @@ -25,7 +25,8 @@ namespace cc { LayerTreePixelTest::LayerTreePixelTest() : pixel_comparator_(new ExactPixelComparator(true)), test_type_(GL_WITH_DEFAULT), - pending_texture_mailbox_callbacks_(0) {} + pending_texture_mailbox_callbacks_(0), + impl_side_painting_(true) {} LayerTreePixelTest::~LayerTreePixelTest() {} @@ -145,12 +146,12 @@ scoped_refptr<SolidColorLayer> LayerTreePixelTest:: border_width, rect.height() - border_width * 2), border_color); - scoped_refptr<SolidColorLayer> border_right = CreateSolidColorLayer( - gfx::Rect(rect.width() - border_width, - border_width, - border_width, - rect.height() - border_width * 2), - border_color); + scoped_refptr<SolidColorLayer> border_right = + CreateSolidColorLayer(gfx::Rect(rect.width() - border_width, + border_width, + border_width, + rect.height() - border_width * 2), + border_color); scoped_refptr<SolidColorLayer> border_bottom = CreateSolidColorLayer( gfx::Rect(0, rect.height() - border_width, rect.width(), border_width), border_color); @@ -188,7 +189,7 @@ void LayerTreePixelTest::RunPixelTest( content_root_ = content_root; readback_target_ = NULL; ref_file_ = file_name; - RunTest(true, false, true); + RunTest(true, false, impl_side_painting_); } void LayerTreePixelTest::RunPixelTestWithReadbackTarget( @@ -200,7 +201,7 @@ void LayerTreePixelTest::RunPixelTestWithReadbackTarget( content_root_ = content_root; readback_target_ = target; ref_file_ = file_name; - RunTest(true, false, true); + RunTest(true, false, impl_side_painting_); } void LayerTreePixelTest::SetupTree() { diff --git a/cc/test/layer_tree_pixel_test.h b/cc/test/layer_tree_pixel_test.h index 1214f61..03747c0 100644 --- a/cc/test/layer_tree_pixel_test.h +++ b/cc/test/layer_tree_pixel_test.h @@ -99,6 +99,7 @@ class LayerTreePixelTest : public LayerTreeTest { scoped_ptr<SkBitmap> result_bitmap_; std::vector<scoped_refptr<TextureLayer> > texture_layers_; int pending_texture_mailbox_callbacks_; + bool impl_side_painting_; }; } // namespace cc diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h index f027c06..4fb5525 100644 --- a/cc/test/layer_tree_test.h +++ b/cc/test/layer_tree_test.h @@ -213,38 +213,62 @@ class LayerTreeTest : public testing::Test, public TestHooks { SINGLE_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) -#define MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME) \ +#define MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \ TEST_F(TEST_FIXTURE_NAME, RunMultiThread_DirectRenderer_MainThreadPaint) { \ RunTest(true, false, false); \ - } \ + } + +#define MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME) \ + MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \ TEST_F(TEST_FIXTURE_NAME, RunMultiThread_DirectRenderer_ImplSidePaint) { \ RunTest(true, false, true); \ } \ class MultiThreadDirectNeedsSemicolon##TEST_FIXTURE_NAME {} +#define MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \ + TEST_F(TEST_FIXTURE_NAME, \ + RunMultiThread_DelegatingRenderer_MainThreadPaint) { \ + RunTest(true, true, false); \ + } + #define MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \ - TEST_F(TEST_FIXTURE_NAME, \ - RunMultiThread_DelegatingRenderer_MainThreadPaint) { \ - RunTest(true, true, false); \ - } \ + MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME)\ TEST_F(TEST_FIXTURE_NAME, \ RunMultiThread_DelegatingRenderer_ImplSidePaint) { \ RunTest(true, true, true); \ } \ class MultiThreadDelegatingNeedsSemicolon##TEST_FIXTURE_NAME {} +#define MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \ + MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ + MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) + #define MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) +#define SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F( \ + TEST_FIXTURE_NAME) \ + SINGLE_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ + MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) + #define SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME) \ SINGLE_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME) +#define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F( \ + TEST_FIXTURE_NAME) \ + SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ + MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) + #define SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) \ SINGLE_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) +#define SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \ + SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ + SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) + #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) |