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

Unified Diff: cc/playback/recording_source_unittest.cc

Issue 2493853002: cc/blimp: Proto Cleanup. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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/BUILD.gn » ('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 0dc8c4573e1bc9856df5b5c690ea8598b2f949aa..32c7ba9de3db67f99f98bcacf6b24506f2b0ac12 100644
--- a/cc/playback/recording_source_unittest.cc
+++ b/cc/playback/recording_source_unittest.cc
@@ -7,7 +7,6 @@
#include "base/memory/ptr_util.h"
#include "cc/base/region.h"
#include "cc/playback/raster_source.h"
-#include "cc/proto/recording_source.pb.h"
#include "cc/test/fake_client_picture_cache.h"
#include "cc/test/fake_content_layer_client.h"
#include "cc/test/fake_engine_picture_cache.h"
@@ -36,65 +35,6 @@ scoped_refptr<RasterSource> CreateRasterSource(
can_use_lcd_text);
}
-void ValidateRecordingSourceSerialization(FakeRecordingSource* source) {
- proto::RecordingSource proto;
- source->ToProtobuf(&proto);
-
- FakeRecordingSource new_source;
- new_source.FromProtobuf(proto, nullptr, gfx::Rect());
-
- EXPECT_TRUE(source->EqualsTo(new_source));
-}
-
-TEST(RecordingSourceTest, TestNullDisplayListSerialization) {
- gfx::Rect recorded_viewport(0, 0, 256, 256);
-
- std::unique_ptr<FakeRecordingSource> recording_source =
- CreateRecordingSource(recorded_viewport);
- recording_source->SetDisplayListUsesCachedPicture(false);
- recording_source->SetGenerateDiscardableImagesMetadata(true);
- recording_source->Rerecord();
- recording_source->SetEmptyBounds();
-
- ValidateRecordingSourceSerialization(recording_source.get());
-}
-
-TEST(RecordingSourceTest, TestEmptySerializationDeserialization) {
- gfx::Rect recorded_viewport(0, 0, 256, 256);
-
- std::unique_ptr<FakeRecordingSource> recording_source =
- CreateRecordingSource(recorded_viewport);
- recording_source->SetDisplayListUsesCachedPicture(false);
- recording_source->SetGenerateDiscardableImagesMetadata(true);
- recording_source->Rerecord();
-
- ValidateRecordingSourceSerialization(recording_source.get());
-}
-
-TEST(RecordingSourceTest, TestPopulatedSerializationDeserialization) {
- gfx::Rect recorded_viewport(0, 0, 256, 256);
-
- std::unique_ptr<FakeRecordingSource> recording_source =
- CreateRecordingSource(recorded_viewport);
- recording_source->SetDisplayListUsesCachedPicture(false);
-
- SkPaint simple_paint;
- simple_paint.setColor(SkColorSetARGB(255, 12, 23, 34));
- recording_source->add_draw_rect_with_paint(gfx::Rect(0, 0, 256, 256),
- simple_paint);
- recording_source->add_draw_rect_with_paint(gfx::Rect(128, 128, 512, 512),
- simple_paint);
- recording_source->add_draw_rect_with_paint(gfx::Rect(512, 0, 256, 256),
- simple_paint);
- recording_source->add_draw_rect_with_paint(gfx::Rect(0, 512, 256, 256),
- simple_paint);
-
- recording_source->SetGenerateDiscardableImagesMetadata(true);
- recording_source->Rerecord();
-
- ValidateRecordingSourceSerialization(recording_source.get());
-}
-
TEST(RecordingSourceTest, DiscardableImagesWithTransform) {
gfx::Rect recorded_viewport(256, 256);
« no previous file with comments | « cc/playback/recording_source.cc ('k') | cc/proto/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698