OLD | NEW |
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 "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
7 #include "base/time.h" | 7 #include "base/time.h" |
8 #include "content/browser/gpu/gpu_data_manager_impl.h" | 8 #include "content/browser/gpu/gpu_data_manager_impl.h" |
9 #include "content/public/browser/gpu_data_manager_observer.h" | 9 #include "content/public/browser/gpu_data_manager_observer.h" |
10 #include "content/public/common/gpu_info.h" | 10 #include "content/public/common/gpu_info.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 GpuDataManagerImpl* operator->() const { return impl_; } | 74 GpuDataManagerImpl* operator->() const { return impl_; } |
75 // Small violation of C++ style guide to avoid polluting several | 75 // Small violation of C++ style guide to avoid polluting several |
76 // tests with get() calls. | 76 // tests with get() calls. |
77 operator GpuDataManagerImpl*() { return impl_; } | 77 operator GpuDataManagerImpl*() { return impl_; } |
78 | 78 |
79 private: | 79 private: |
80 GpuDataManagerImpl* impl_; | 80 GpuDataManagerImpl* impl_; |
81 DISALLOW_COPY_AND_ASSIGN(ScopedGpuDataManagerImpl); | 81 DISALLOW_COPY_AND_ASSIGN(ScopedGpuDataManagerImpl); |
82 }; | 82 }; |
83 | 83 |
84 void SetUp() { | 84 virtual void SetUp() { |
85 } | 85 } |
86 | 86 |
87 void TearDown() { | 87 virtual void TearDown() { |
88 } | 88 } |
89 | 89 |
90 base::Time JustBeforeExpiration(GpuDataManagerImpl* manager); | 90 base::Time JustBeforeExpiration(GpuDataManagerImpl* manager); |
91 base::Time JustAfterExpiration(GpuDataManagerImpl* manager); | 91 base::Time JustAfterExpiration(GpuDataManagerImpl* manager); |
92 void TestBlockingDomainFrom3DAPIs( | 92 void TestBlockingDomainFrom3DAPIs( |
93 GpuDataManagerImpl::DomainGuilt guilt_level); | 93 GpuDataManagerImpl::DomainGuilt guilt_level); |
94 void TestUnblockingDomainFrom3DAPIs( | 94 void TestUnblockingDomainFrom3DAPIs( |
95 GpuDataManagerImpl::DomainGuilt guilt_level); | 95 GpuDataManagerImpl::DomainGuilt guilt_level); |
96 | 96 |
97 MessageLoop message_loop_; | 97 MessageLoop message_loop_; |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 // Now assume browser gets GL strings from local state. | 556 // Now assume browser gets GL strings from local state. |
557 // SetGLStrings() has no effects because GPUInfo already got these strings. | 557 // SetGLStrings() has no effects because GPUInfo already got these strings. |
558 // (Otherwise the entry should not apply.) | 558 // (Otherwise the entry should not apply.) |
559 manager->SetGLStrings(kGLVendorMesa, kGLRendererMesa, kGLVersionMesa802); | 559 manager->SetGLStrings(kGLVendorMesa, kGLRendererMesa, kGLVersionMesa802); |
560 EXPECT_TRUE(manager->GpuAccessAllowed()); | 560 EXPECT_TRUE(manager->GpuAccessAllowed()); |
561 EXPECT_EQ(GPU_FEATURE_TYPE_WEBGL, manager->GetBlacklistedFeatures()); | 561 EXPECT_EQ(GPU_FEATURE_TYPE_WEBGL, manager->GetBlacklistedFeatures()); |
562 } | 562 } |
563 #endif // OS_LINUX | 563 #endif // OS_LINUX |
564 | 564 |
565 } // namespace content | 565 } // namespace content |
OLD | NEW |