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

Unified Diff: cc/playback/recording_source_unittest.cc

Issue 2141233002: cc: Clean up RecordingSource API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ContentLayerClient* painter from UpdateAndExpandInvalidation and sync to head Created 4 years, 4 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/playback/recording_source.cc ('k') | cc/proto/layer.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/recording_source_unittest.cc
diff --git a/cc/playback/recording_source_unittest.cc b/cc/playback/recording_source_unittest.cc
index 7b83a6d110e1ba4c39425459622d2be3274d892f..be8c755af3c6d9365fefeefa5e137d3e097578fb 100644
--- a/cc/playback/recording_source_unittest.cc
+++ b/cc/playback/recording_source_unittest.cc
@@ -37,30 +37,11 @@ scoped_refptr<RasterSource> CreateRasterSource(
}
void ValidateRecordingSourceSerialization(FakeRecordingSource* source) {
- std::unique_ptr<FakeImageSerializationProcessor>
- fake_image_serialization_processor =
- base::WrapUnique(new FakeImageSerializationProcessor);
- std::unique_ptr<EnginePictureCache> fake_engine_picture_cache =
- fake_image_serialization_processor->CreateEnginePictureCache();
- FakeEnginePictureCache* fake_engine_picture_cache_ptr =
- static_cast<FakeEnginePictureCache*>(fake_engine_picture_cache.get());
- std::unique_ptr<ClientPictureCache> fake_client_picture_cache =
- fake_image_serialization_processor->CreateClientPictureCache();
-
- fake_engine_picture_cache_ptr->MarkAllSkPicturesAsUsed(
- source->GetDisplayItemList());
-
proto::RecordingSource proto;
source->ToProtobuf(&proto);
- std::vector<uint32_t> actual_picture_ids;
FakeRecordingSource new_source;
- new_source.FromProtobuf(proto, fake_client_picture_cache.get(),
- &actual_picture_ids);
-
- EXPECT_THAT(actual_picture_ids,
- testing::UnorderedElementsAreArray(
- fake_engine_picture_cache_ptr->GetAllUsedPictureIds()));
+ new_source.FromProtobuf(proto, nullptr);
EXPECT_TRUE(source->EqualsTo(new_source));
}
« no previous file with comments | « cc/playback/recording_source.cc ('k') | cc/proto/layer.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698