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

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl_private_unittest.cc

Issue 678073006: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bogus formatting 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "content/browser/gpu/gpu_data_manager_impl_private.h" 9 #include "content/browser/gpu/gpu_data_manager_impl_private.h"
10 #include "content/public/browser/gpu_data_manager_observer.h" 10 #include "content/public/browser/gpu_data_manager_observer.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 static GURL GetDomain2ForTesting() { 64 static GURL GetDomain2ForTesting() {
65 return GURL("http://bar.com/"); 65 return GURL("http://bar.com/");
66 } 66 }
67 67
68 } // namespace anonymous 68 } // namespace anonymous
69 69
70 class GpuDataManagerImplPrivateTest : public testing::Test { 70 class GpuDataManagerImplPrivateTest : public testing::Test {
71 public: 71 public:
72 GpuDataManagerImplPrivateTest() { } 72 GpuDataManagerImplPrivateTest() { }
73 73
74 virtual ~GpuDataManagerImplPrivateTest() { } 74 ~GpuDataManagerImplPrivateTest() override {}
75 75
76 protected: 76 protected:
77 // scoped_ptr doesn't work with GpuDataManagerImpl because its 77 // scoped_ptr doesn't work with GpuDataManagerImpl because its
78 // destructor is private. GpuDataManagerImplPrivateTest is however a friend 78 // destructor is private. GpuDataManagerImplPrivateTest is however a friend
79 // so we can make a little helper class here. 79 // so we can make a little helper class here.
80 class ScopedGpuDataManagerImpl { 80 class ScopedGpuDataManagerImpl {
81 public: 81 public:
82 ScopedGpuDataManagerImpl() : impl_(new GpuDataManagerImpl()) { 82 ScopedGpuDataManagerImpl() : impl_(new GpuDataManagerImpl()) {
83 EXPECT_TRUE(impl_); 83 EXPECT_TRUE(impl_);
84 EXPECT_TRUE(impl_->private_.get()); 84 EXPECT_TRUE(impl_->private_.get());
(...skipping 25 matching lines...) Expand all
110 110
111 GpuDataManagerImplPrivate* operator->() const { 111 GpuDataManagerImplPrivate* operator->() const {
112 return impl_->private_.get(); 112 return impl_->private_.get();
113 } 113 }
114 114
115 private: 115 private:
116 GpuDataManagerImpl* impl_; 116 GpuDataManagerImpl* impl_;
117 DISALLOW_COPY_AND_ASSIGN(ScopedGpuDataManagerImplPrivate); 117 DISALLOW_COPY_AND_ASSIGN(ScopedGpuDataManagerImplPrivate);
118 }; 118 };
119 119
120 virtual void SetUp() { 120 void SetUp() override {}
121 }
122 121
123 virtual void TearDown() { 122 void TearDown() override {}
124 }
125 123
126 base::Time JustBeforeExpiration(const GpuDataManagerImplPrivate* manager); 124 base::Time JustBeforeExpiration(const GpuDataManagerImplPrivate* manager);
127 base::Time JustAfterExpiration(const GpuDataManagerImplPrivate* manager); 125 base::Time JustAfterExpiration(const GpuDataManagerImplPrivate* manager);
128 void TestBlockingDomainFrom3DAPIs( 126 void TestBlockingDomainFrom3DAPIs(
129 GpuDataManagerImpl::DomainGuilt guilt_level); 127 GpuDataManagerImpl::DomainGuilt guilt_level);
130 void TestUnblockingDomainFrom3DAPIs( 128 void TestUnblockingDomainFrom3DAPIs(
131 GpuDataManagerImpl::DomainGuilt guilt_level); 129 GpuDataManagerImpl::DomainGuilt guilt_level);
132 130
133 base::MessageLoop message_loop_; 131 base::MessageLoop message_loop_;
134 }; 132 };
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 EXPECT_TRUE(manager->UpdateActiveGpu(0x8086, 0x04a1)); 745 EXPECT_TRUE(manager->UpdateActiveGpu(0x8086, 0x04a1));
748 { 746 {
749 base::RunLoop run_loop; 747 base::RunLoop run_loop;
750 run_loop.RunUntilIdle(); 748 run_loop.RunUntilIdle();
751 } 749 }
752 EXPECT_TRUE(observer.gpu_info_updated()); 750 EXPECT_TRUE(observer.gpu_info_updated());
753 EXPECT_EQ(1u, manager->GetBlacklistedFeatureCount()); 751 EXPECT_EQ(1u, manager->GetBlacklistedFeatureCount());
754 } 752 }
755 753
756 } // namespace content 754 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/wifi_data_provider_linux_unittest.cc ('k') | content/browser/gpu/shader_disk_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698