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

Unified Diff: cc/surfaces/surface_factory_unittest.cc

Issue 2855723002: Don't submit frames with no render passes in cc tests (Closed)
Patch Set: c Created 3 years, 7 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_aggregator_unittest.cc ('k') | cc/surfaces/surface_hittest.cc » ('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 70f1051cd59622f5fce1b59d02b3ed5873f35714..8e970dc4ed3ec189d5cce5dea5fb2ca8d0f26cf9 100644
--- a/cc/surfaces/surface_factory_unittest.cc
+++ b/cc/surfaces/surface_factory_unittest.cc
@@ -22,6 +22,7 @@
#include "cc/surfaces/surface_info.h"
#include "cc/surfaces/surface_manager.h"
#include "cc/surfaces/surface_resource_holder_client.h"
+#include "cc/test/compositor_frame_helpers.h"
#include "cc/test/fake_surface_resource_holder_client.h"
#include "cc/test/scheduler_test_common.h"
#include "cc/test/stub_surface_factory_client.h"
@@ -82,7 +83,7 @@ class SurfaceFactoryTest : public testing::Test, public SurfaceObserver {
void SubmitCompositorFrameWithResources(ResourceId* resource_ids,
size_t num_resource_ids) {
- CompositorFrame frame;
+ CompositorFrame frame = test::MakeCompositorFrame();
for (size_t i = 0u; i < num_resource_ids; ++i) {
TransferableResource resource;
resource.id = resource_ids[i];
@@ -451,18 +452,6 @@ TEST_F(SurfaceFactoryTest, ResourceLifetime) {
}
}
-TEST_F(SurfaceFactoryTest, BlankNoIndexIncrement) {
- LocalSurfaceId local_surface_id(6, kArbitraryToken);
- SurfaceId surface_id(kArbitraryFrameSinkId, local_surface_id);
- factory_->SubmitCompositorFrame(local_surface_id, CompositorFrame(),
- SurfaceFactory::DrawCallback(),
- SurfaceFactory::WillDrawCallback());
- Surface* surface = manager_.GetSurfaceForId(surface_id);
- ASSERT_NE(nullptr, surface);
- EXPECT_EQ(2, surface->frame_index());
- EXPECT_EQ(last_created_surface_id().local_surface_id(), local_surface_id);
-}
-
void CreateSurfaceDrawCallback(SurfaceFactory* factory,
uint32_t* execute_count) {
LocalSurfaceId new_id(7, base::UnguessableToken::Create());
« no previous file with comments | « cc/surfaces/surface_aggregator_unittest.cc ('k') | cc/surfaces/surface_hittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698