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

Unified Diff: cc/surfaces/surface_aggregator_unittest.cc

Issue 1996783002: Make cc::SurfaceId unguessable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed more build targets Created 4 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
Index: cc/surfaces/surface_aggregator_unittest.cc
diff --git a/cc/surfaces/surface_aggregator_unittest.cc b/cc/surfaces/surface_aggregator_unittest.cc
index b0ab189c474f73ba9231bb648bf3f257e52c993c..5db2b72e2d350acf3cb2f9b639cf9fe61e197843 100644
--- a/cc/surfaces/surface_aggregator_unittest.cc
+++ b/cc/surfaces/surface_aggregator_unittest.cc
@@ -39,7 +39,7 @@ namespace {
SurfaceId InvalidSurfaceId() {
static SurfaceId invalid;
- invalid.id = static_cast<uint64_t>(-1);
+ invalid.local_id = static_cast<uint64_t>(-1);
return invalid;
}
@@ -79,7 +79,7 @@ class SurfaceAggregatorTest : public testing::Test {
};
TEST_F(SurfaceAggregatorTest, ValidSurfaceNoFrame) {
- SurfaceId one_id(7);
+ SurfaceId one_id(0, 7);
factory_.Create(one_id);
std::unique_ptr<CompositorFrame> frame = aggregator_.Aggregate(one_id);
@@ -1961,7 +1961,7 @@ void SubmitCompositorFrameWithResources(ResourceId* resource_ids,
TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) {
ResourceTrackingSurfaceFactoryClient client;
SurfaceFactory factory(&manager_, &client);
- SurfaceId surface_id(7u);
+ SurfaceId surface_id(0, 7u);
factory.Create(surface_id);
ResourceId ids[] = {11, 12, 13};
@@ -1991,7 +1991,7 @@ TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) {
TEST_F(SurfaceAggregatorWithResourcesTest, TakeInvalidResources) {
ResourceTrackingSurfaceFactoryClient client;
SurfaceFactory factory(&manager_, &client);
- SurfaceId surface_id(7u);
+ SurfaceId surface_id(0, 7u);
factory.Create(surface_id);
std::unique_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
@@ -2026,10 +2026,10 @@ TEST_F(SurfaceAggregatorWithResourcesTest, TakeInvalidResources) {
TEST_F(SurfaceAggregatorWithResourcesTest, TwoSurfaces) {
ResourceTrackingSurfaceFactoryClient client;
SurfaceFactory factory(&manager_, &client);
- SurfaceId surface1_id(7u);
+ SurfaceId surface1_id(0, 7u);
factory.Create(surface1_id);
- SurfaceId surface2_id(8u);
+ SurfaceId surface2_id(0, 8u);
factory.Create(surface2_id);
ResourceId ids[] = {11, 12, 13};
@@ -2067,11 +2067,11 @@ TEST_F(SurfaceAggregatorWithResourcesTest, TwoSurfaces) {
TEST_F(SurfaceAggregatorWithResourcesTest, InvalidChildSurface) {
ResourceTrackingSurfaceFactoryClient client;
SurfaceFactory factory(&manager_, &client);
- SurfaceId root_surface_id(7u);
+ SurfaceId root_surface_id(0, 7u);
factory.Create(root_surface_id);
- SurfaceId middle_surface_id(8u);
+ SurfaceId middle_surface_id(0, 8u);
factory.Create(middle_surface_id);
- SurfaceId child_surface_id(9u);
+ SurfaceId child_surface_id(0, 9u);
factory.Create(child_surface_id);
ResourceId ids[] = {14, 15, 16};
@@ -2115,10 +2115,10 @@ TEST_F(SurfaceAggregatorWithResourcesTest, InvalidChildSurface) {
TEST_F(SurfaceAggregatorWithResourcesTest, SecureOutputTexture) {
ResourceTrackingSurfaceFactoryClient client;
SurfaceFactory factory(&manager_, &client);
- SurfaceId surface1_id(7u);
+ SurfaceId surface1_id(0, 7u);
factory.Create(surface1_id);
- SurfaceId surface2_id(8u);
+ SurfaceId surface2_id(0, 8u);
factory.Create(surface2_id);
ResourceId ids[] = {11, 12, 13};

Powered by Google App Engine
This is Rietveld 408576698