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

Unified Diff: cc/tiles/tile_manager_unittest.cc

Issue 1951193002: cc: Add mailbox support to ResourceProvider write locks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@worker_context_stream
Patch Set: ericrk's review Created 4 years, 6 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
Index: cc/tiles/tile_manager_unittest.cc
diff --git a/cc/tiles/tile_manager_unittest.cc b/cc/tiles/tile_manager_unittest.cc
index fb36287da1b35196098b958648e22fc7bd74e7ab..42e1f979da37ceedeb570d702d67204da32627e1 100644
--- a/cc/tiles/tile_manager_unittest.cc
+++ b/cc/tiles/tile_manager_unittest.cc
@@ -1809,15 +1809,6 @@ class VerifyResourceContentIdRasterBufferProvider
uint64_t expected_resource_id_;
};
-class VerifyResourceContentIdTileTaskManager : public FakeTileTaskManagerImpl {
- public:
- explicit VerifyResourceContentIdTileTaskManager(uint64_t expected_resource_id)
- : FakeTileTaskManagerImpl(base::WrapUnique<RasterBufferProvider>(
- new VerifyResourceContentIdRasterBufferProvider(
- expected_resource_id))) {}
- ~VerifyResourceContentIdTileTaskManager() override {}
-};
-
// Runs a test to ensure that partial raster is either enabled or disabled,
// depending on |partial_raster_enabled|'s value. Takes ownership of host_impl
// so that cleanup order can be controlled.
@@ -1831,9 +1822,13 @@ void RunPartialRasterCheck(std::unique_ptr<LayerTreeHostImpl> host_impl,
// Create a VerifyResourceContentIdTileTaskManager to ensure that the
// raster task we see is created with |kExpectedId|.
- VerifyResourceContentIdTileTaskManager verifying_task_manager(kExpectedId);
- host_impl->tile_manager()->SetTileTaskManagerForTesting(
- &verifying_task_manager);
+ FakeTileTaskManagerImpl tile_task_manager;
+ host_impl->tile_manager()->SetTileTaskManagerForTesting(&tile_task_manager);
+
+ VerifyResourceContentIdRasterBufferProvider raster_buffer_provider(
+ kExpectedId);
+ host_impl->tile_manager()->SetRasterBufferProviderForTesting(
+ &raster_buffer_provider);
// Ensure there's a resource with our |kInvalidatedId| in the resource pool.
host_impl->resource_pool()->ReleaseResource(

Powered by Google App Engine
This is Rietveld 408576698