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

Unified Diff: cc/surfaces/surface_factory_unittest.cc

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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/surfaces/surface_display_output_surface.cc ('k') | cc/test/fake_content_layer_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_factory_unittest.cc
diff --git a/cc/surfaces/surface_factory_unittest.cc b/cc/surfaces/surface_factory_unittest.cc
index b5c2a63756900adc90efe16df0091018e0d3a989..b9c6bf5c20738f6c255d6dd16a34362375e681d6 100644
--- a/cc/surfaces/surface_factory_unittest.cc
+++ b/cc/surfaces/surface_factory_unittest.cc
@@ -360,6 +360,21 @@ TEST_F(SurfaceFactoryTest, ResourceLifetime) {
}
}
+TEST_F(SurfaceFactoryTest, BlankNoIndexIncrement) {
+ SurfaceId surface_id(6);
+ factory_.Create(surface_id);
+ Surface* surface = manager_.GetSurfaceForId(surface_id);
+ ASSERT_NE(nullptr, surface);
+ EXPECT_EQ(2, surface->frame_index());
+ scoped_ptr<CompositorFrame> frame(new CompositorFrame);
+ frame->delegated_frame_data.reset(new DelegatedFrameData);
+
+ factory_.SubmitFrame(surface_id, frame.Pass(),
+ SurfaceFactory::DrawCallback());
+ EXPECT_EQ(2, surface->frame_index());
+ factory_.Destroy(surface_id);
+}
+
void DrawCallback(uint32* execute_count,
SurfaceDrawStatus* result,
SurfaceDrawStatus drawn) {
« no previous file with comments | « cc/surfaces/surface_display_output_surface.cc ('k') | cc/test/fake_content_layer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698