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

Side by Side Diff: content/common/gpu/gpu_memory_manager_unittest.cc

Issue 11227033: Move a bunch of code in content\common (as well as a few left in renderer) to the content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 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 | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/gpu_memory_manager.cc ('k') | content/common/gpu/gpu_memory_tracking.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gpu/gpu_command_buffer_stub.h" 5 #include "content/common/gpu/gpu_command_buffer_stub.h"
6 #include "content/common/gpu/gpu_memory_allocation.h" 6 #include "content/common/gpu/gpu_memory_allocation.h"
7 #include "content/common/gpu/gpu_memory_manager.h" 7 #include "content/common/gpu/gpu_memory_manager.h"
8 #include "ui/gfx/size_conversions.h" 8 #include "ui/gfx/size_conversions.h"
9 9
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace content {
13
12 class FakeCommandBufferStub : public GpuCommandBufferStubBase { 14 class FakeCommandBufferStub : public GpuCommandBufferStubBase {
13 public: 15 public:
14 MemoryManagerState memory_manager_state_; 16 MemoryManagerState memory_manager_state_;
15 GpuMemoryAllocation allocation_; 17 GpuMemoryAllocation allocation_;
16 gfx::Size size_; 18 gfx::Size size_;
17 19
18 FakeCommandBufferStub() 20 FakeCommandBufferStub()
19 : memory_manager_state_(0, false, base::TimeTicks()) { 21 : memory_manager_state_(0, false, base::TimeTicks()) {
20 memory_manager_state_.client_has_memory_allocation_changed_callback = true; 22 memory_manager_state_.client_has_memory_allocation_changed_callback = true;
21 } 23 }
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 EXPECT_FALSE(stats[&stub1].visible); 677 EXPECT_FALSE(stats[&stub1].visible);
676 EXPECT_FALSE(stats[&stub2].visible); 678 EXPECT_FALSE(stats[&stub2].visible);
677 EXPECT_TRUE(stats[&stub3].visible); 679 EXPECT_TRUE(stats[&stub3].visible);
678 EXPECT_EQ(stub1allocation4, 0ul); 680 EXPECT_EQ(stub1allocation4, 0ul);
679 EXPECT_GE(stub2allocation4, 0ul); 681 EXPECT_GE(stub2allocation4, 0ul);
680 EXPECT_GT(stub3allocation4, 0ul); 682 EXPECT_GT(stub3allocation4, 0ul);
681 if (compositors_get_bonus_allocation && 683 if (compositors_get_bonus_allocation &&
682 stub3allocation3 != GetMaximumTabAllocation()) 684 stub3allocation3 != GetMaximumTabAllocation())
683 EXPECT_GT(stub3allocation4, stub3allocation3); 685 EXPECT_GT(stub3allocation4, stub3allocation3);
684 } 686 }
687
688 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_memory_manager.cc ('k') | content/common/gpu/gpu_memory_tracking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698