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

Side by Side Diff: components/viz/display_compositor/host_shared_bitmap_manager_unittest.cc

Issue 2873243002: Move components/display_compositor to components/viz/display_compositor (Closed)
Patch Set: Rebase Created 3 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 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 <stddef.h> 5 #include <stddef.h>
6 #include <string.h> 6 #include <string.h>
7 7
8 #include "components/display_compositor/host_shared_bitmap_manager.h" 8 #include "components/viz/display_compositor/host_shared_bitmap_manager.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace display_compositor { 11 namespace viz {
12 namespace { 12 namespace {
13 13
14 class HostSharedBitmapManagerTest : public testing::Test { 14 class HostSharedBitmapManagerTest : public testing::Test {
15 protected: 15 protected:
16 void SetUp() override { manager_.reset(new HostSharedBitmapManager()); } 16 void SetUp() override { manager_.reset(new HostSharedBitmapManager()); }
17 std::unique_ptr<HostSharedBitmapManager> manager_; 17 std::unique_ptr<HostSharedBitmapManager> manager_;
18 }; 18 };
19 19
20 TEST_F(HostSharedBitmapManagerTest, TestCreate) { 20 TEST_F(HostSharedBitmapManagerTest, TestCreate) {
21 gfx::Size bitmap_size(1, 1); 21 gfx::Size bitmap_size(1, 1);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 std::unique_ptr<cc::SharedBitmap> shared_bitmap; 128 std::unique_ptr<cc::SharedBitmap> shared_bitmap;
129 shared_bitmap = manager_->GetSharedBitmapFromId(bitmap_size, id); 129 shared_bitmap = manager_->GetSharedBitmapFromId(bitmap_size, id);
130 ASSERT_TRUE(shared_bitmap.get() != NULL); 130 ASSERT_TRUE(shared_bitmap.get() != NULL);
131 EXPECT_EQ(memcmp(shared_bitmap->pixels(), bitmap->memory(), size_in_bytes), 131 EXPECT_EQ(memcmp(shared_bitmap->pixels(), bitmap->memory(), size_in_bytes),
132 0); 132 0);
133 client.DidDeleteSharedBitmap(id); 133 client.DidDeleteSharedBitmap(id);
134 } 134 }
135 135
136 } // namespace 136 } // namespace
137 } // namespace display_compositor 137 } // namespace viz
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698