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

Unified Diff: content/browser/gpu/gpu_data_manager_impl_private_unittest.cc

Issue 2827323002: gpu:: Remove GpuDataManagerObserver::OnVideoMemoryUsageStatsUpdate(). (Closed)
Patch Set: . Created 3 years, 8 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
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | content/public/browser/gpu_data_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
diff --git a/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc b/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
index 137e9ca0a51ea7dfef90c68397b4a08dc3d7cd96..37afb585b82eac2f3c857ba4ce5b38ae9827e734 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
@@ -32,32 +32,19 @@ namespace {
class TestObserver : public GpuDataManagerObserver {
public:
- TestObserver()
- : gpu_info_updated_(false),
- video_memory_usage_stats_updated_(false) {
- }
+ TestObserver() {}
~TestObserver() override {}
bool gpu_info_updated() const { return gpu_info_updated_; }
- bool video_memory_usage_stats_updated() const {
- return video_memory_usage_stats_updated_;
- }
void OnGpuInfoUpdate() override { gpu_info_updated_ = true; }
- void OnVideoMemoryUsageStatsUpdate(
- const gpu::VideoMemoryUsageStats& stats) override {
- video_memory_usage_stats_updated_ = true;
- }
-
void Reset() {
gpu_info_updated_ = false;
- video_memory_usage_stats_updated_ = false;
}
private:
- bool gpu_info_updated_;
- bool video_memory_usage_stats_updated_;
+ bool gpu_info_updated_ = false;
};
static base::Time GetTimeForTesting() {
@@ -404,27 +391,6 @@ TEST_F(GpuDataManagerImplPrivateTest, NoGpuInfoUpdateWithSwiftShader) {
}
}
-TEST_F(GpuDataManagerImplPrivateTest, GPUVideoMemoryUsageStatsUpdate) {
- ScopedGpuDataManagerImpl manager;
-
- TestObserver observer;
- manager->AddObserver(&observer);
-
- {
- base::RunLoop run_loop;
- run_loop.RunUntilIdle();
- }
- EXPECT_FALSE(observer.video_memory_usage_stats_updated());
-
- gpu::VideoMemoryUsageStats vram_stats;
- manager->UpdateVideoMemoryUsageStats(vram_stats);
- {
- base::RunLoop run_loop;
- run_loop.RunUntilIdle();
- }
- EXPECT_TRUE(observer.video_memory_usage_stats_updated());
-}
-
base::Time GpuDataManagerImplPrivateTest::JustBeforeExpiration(
const GpuDataManagerImplPrivate* manager) {
return GetTimeForTesting() + base::TimeDelta::FromMilliseconds(
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | content/public/browser/gpu_data_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698