Chromium Code Reviews| Index: components/exo/surface_unittest.cc |
| diff --git a/components/exo/surface_unittest.cc b/components/exo/surface_unittest.cc |
| index ed1834df38b82333a28c1ebc1ba0394d7e98118a..1795bca80de3ba4ea1ee36be75bfaa68e139c32f 100644 |
| --- a/components/exo/surface_unittest.cc |
| +++ b/components/exo/surface_unittest.cc |
| @@ -153,6 +153,30 @@ TEST_F(SurfaceTest, SetOnlyVisibleOnSecureOutput) { |
| release_callback->Run(gpu::SyncToken(), false); |
| } |
| +TEST_F(SurfaceTest, SetBlendMode) { |
| + gfx::Size buffer_size(1, 1); |
| + std::unique_ptr<Buffer> buffer( |
| + new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size))); |
| + std::unique_ptr<Surface> surface(new Surface); |
| + |
| + surface->Attach(buffer.get()); |
| + surface->SetBlendMode(SkXfermode::kSrc_Mode); |
| + surface->Commit(); |
| + |
| + EXPECT_TRUE(surface->layer()->fills_bounds_opaquely()); |
| +} |
| + |
| +TEST_F(SurfaceTest, SetAlpha) { |
| + gfx::Size buffer_size(1, 1); |
| + std::unique_ptr<Buffer> buffer( |
| + new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size))); |
| + std::unique_ptr<Surface> surface(new Surface); |
| + |
| + surface->Attach(buffer.get()); |
| + surface->SetAlpha(0.5f); |
| + surface->Commit(); |
| +} |
|
Daniele Castagna
2016/05/09 23:34:19
Is has_external_content true? Can you check the al
reveman
2016/05/10 14:05:19
has_external_content is true independent of this.
|
| + |
| TEST_F(SurfaceTest, Commit) { |
| std::unique_ptr<Surface> surface(new Surface); |