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

Side by Side Diff: content/browser/renderer_host/software_frame_manager_unittest.cc

Issue 43193002: Aura/ÜC: Drop frames on background tabs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CONTENT_EXPORT Created 7 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/browser/renderer_host/software_frame_manager.cc ('k') | content/content_browser.gypi » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/browser/renderer_host/software_frame_manager.h" 5 #include "content/browser/renderer_host/software_frame_manager.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/sys_info.h" 9 #include "base/sys_info.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void AllocateClients(size_t num_clients) { 60 void AllocateClients(size_t num_clients) {
61 for (size_t i = 0; i < num_clients; ++i) 61 for (size_t i = 0; i < num_clients; ++i)
62 clients_.push_back(new FakeSoftwareFrameManagerClient); 62 clients_.push_back(new FakeSoftwareFrameManagerClient);
63 } 63 }
64 void FreeClients() { 64 void FreeClients() {
65 for (size_t i = 0; i < clients_.size(); ++i) 65 for (size_t i = 0; i < clients_.size(); ++i)
66 delete clients_[i]; 66 delete clients_[i];
67 clients_.clear(); 67 clients_.clear();
68 } 68 }
69 size_t MaxNumberOfSavedFrames() const { 69 size_t MaxNumberOfSavedFrames() const {
70 size_t result = SoftwareFrameMemoryManager::GetInstance()-> 70 size_t result =
71 max_number_of_saved_frames(); 71 RendererFrameManager::GetInstance()->max_number_of_saved_frames();
72 return result; 72 return result;
73 } 73 }
74 74
75 protected: 75 protected:
76 std::vector<FakeSoftwareFrameManagerClient*> clients_; 76 std::vector<FakeSoftwareFrameManagerClient*> clients_;
77 77
78 private: 78 private:
79 DISALLOW_COPY_AND_ASSIGN(SoftwareFrameManagerTest); 79 DISALLOW_COPY_AND_ASSIGN(SoftwareFrameManagerTest);
80 }; 80 };
81 81
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 EXPECT_EQ(1u, test_client->evicted_frame_count()); 246 EXPECT_EQ(1u, test_client->evicted_frame_count());
247 callback->Run(0, false); 247 callback->Run(0, false);
248 callback.reset(); 248 callback.reset();
249 EXPECT_EQ(10u, test_client->freed_frame_count()); 249 EXPECT_EQ(10u, test_client->freed_frame_count());
250 EXPECT_EQ(1u, test_client->evicted_frame_count()); 250 EXPECT_EQ(1u, test_client->evicted_frame_count());
251 251
252 FreeClients(); 252 FreeClients();
253 } 253 }
254 254
255 } // namespace content 255 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/software_frame_manager.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698