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

Unified Diff: cc/layers/ui_resource_layer_impl_unittest.cc

Issue 1062043003: cc: Add ResourceId validation checks at the time of AppendQuads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resource-validate: fixtests Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/ui_resource_layer_impl.cc ('k') | cc/layers/video_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/ui_resource_layer_impl_unittest.cc
diff --git a/cc/layers/ui_resource_layer_impl_unittest.cc b/cc/layers/ui_resource_layer_impl_unittest.cc
index 4509ae3ea53a5a98015b1c23c13fcd60ed9cfe57..b725e6d44e9c27ace67cadbba0014a4ca832affd 100644
--- a/cc/layers/ui_resource_layer_impl_unittest.cc
+++ b/cc/layers/ui_resource_layer_impl_unittest.cc
@@ -9,6 +9,7 @@
#include "cc/resources/ui_resource_client.h"
#include "cc/test/fake_impl_proxy.h"
#include "cc/test/fake_layer_tree_host_impl.h"
+#include "cc/test/fake_output_surface.h"
#include "cc/test/fake_ui_resource_layer_tree_host_impl.h"
#include "cc/test/layer_test_common.h"
#include "cc/test/test_shared_bitmap_manager.h"
@@ -59,6 +60,8 @@ TEST(UIResourceLayerImplTest, VerifyDrawQuads) {
FakeImplProxy proxy;
TestSharedBitmapManager shared_bitmap_manager;
FakeUIResourceLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager);
+ host_impl.InitializeRenderer(FakeOutputSurface::Create3d());
+
// Make sure we're appending quads when there are valid values.
gfx::Size bitmap_size(100, 100);
gfx::Size layer_size(100, 100);;
@@ -101,6 +104,7 @@ TEST(UIResourceLayerImplTest, VerifySetOpaqueOnSkBitmap) {
FakeImplProxy proxy;
TestSharedBitmapManager shared_bitmap_manager;
FakeUIResourceLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager);
+ host_impl.InitializeRenderer(FakeOutputSurface::Create3d());
gfx::Size bitmap_size(100, 100);
gfx::Size layer_size(100, 100);;
@@ -128,6 +132,7 @@ TEST(UIResourceLayerImplTest, VerifySetOpaqueOnLayer) {
FakeImplProxy proxy;
TestSharedBitmapManager shared_bitmap_manager;
FakeUIResourceLayerTreeHostImpl host_impl(&proxy, &shared_bitmap_manager);
+ host_impl.InitializeRenderer(FakeOutputSurface::Create3d());
gfx::Size bitmap_size(100, 100);
gfx::Size layer_size(100, 100);
« no previous file with comments | « cc/layers/ui_resource_layer_impl.cc ('k') | cc/layers/video_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698