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

Side by Side Diff: content/common/host_shared_bitmap_manager_unittest.cc

Issue 686523002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/host_shared_bitmap_manager.h" 5 #include "content/common/host_shared_bitmap_manager.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace content { 8 namespace content {
9 namespace { 9 namespace {
10 10
11 class HostSharedBitmapManagerTest : public testing::Test { 11 class HostSharedBitmapManagerTest : public testing::Test {
12 protected: 12 protected:
13 virtual void SetUp() { manager_.reset(new HostSharedBitmapManager()); } 13 void SetUp() override { manager_.reset(new HostSharedBitmapManager()); }
14 scoped_ptr<HostSharedBitmapManager> manager_; 14 scoped_ptr<HostSharedBitmapManager> manager_;
15 }; 15 };
16 16
17 TEST_F(HostSharedBitmapManagerTest, TestCreate) { 17 TEST_F(HostSharedBitmapManagerTest, TestCreate) {
18 gfx::Size bitmap_size(1, 1); 18 gfx::Size bitmap_size(1, 1);
19 size_t size_in_bytes; 19 size_t size_in_bytes;
20 EXPECT_TRUE(cc::SharedBitmap::SizeInBytes(bitmap_size, &size_in_bytes)); 20 EXPECT_TRUE(cc::SharedBitmap::SizeInBytes(bitmap_size, &size_in_bytes));
21 scoped_ptr<base::SharedMemory> bitmap(new base::SharedMemory()); 21 scoped_ptr<base::SharedMemory> bitmap(new base::SharedMemory());
22 bitmap->CreateAndMapAnonymous(size_in_bytes); 22 bitmap->CreateAndMapAnonymous(size_in_bytes);
23 memset(bitmap->memory(), 0xff, size_in_bytes); 23 memset(bitmap->memory(), 0xff, size_in_bytes);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 scoped_ptr<cc::SharedBitmap> shared_bitmap; 152 scoped_ptr<cc::SharedBitmap> shared_bitmap;
153 shared_bitmap = manager_->GetSharedBitmapFromId(bitmap_size, id); 153 shared_bitmap = manager_->GetSharedBitmapFromId(bitmap_size, id);
154 ASSERT_TRUE(shared_bitmap.get() != NULL); 154 ASSERT_TRUE(shared_bitmap.get() != NULL);
155 EXPECT_EQ(memcmp(shared_bitmap->pixels(), bitmap->memory(), size_in_bytes), 155 EXPECT_EQ(memcmp(shared_bitmap->pixels(), bitmap->memory(), size_in_bytes),
156 0); 156 0);
157 } 157 }
158 158
159 } // namespace 159 } // namespace
160 } // namespace content 160 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_memory_manager_unittest.cc ('k') | content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698