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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "content/browser/gpu/gpu_data_manager_impl.h" | 9 #include "content/browser/gpu/gpu_data_manager_impl.h" |
10 #include "content/public/browser/gpu_data_manager_observer.h" | 10 #include "content/public/browser/gpu_data_manager_observer.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 virtual void TearDown() { | 92 virtual void TearDown() { |
93 } | 93 } |
94 | 94 |
95 base::Time JustBeforeExpiration(GpuDataManagerImpl* manager); | 95 base::Time JustBeforeExpiration(GpuDataManagerImpl* manager); |
96 base::Time JustAfterExpiration(GpuDataManagerImpl* manager); | 96 base::Time JustAfterExpiration(GpuDataManagerImpl* manager); |
97 void TestBlockingDomainFrom3DAPIs( | 97 void TestBlockingDomainFrom3DAPIs( |
98 GpuDataManagerImpl::DomainGuilt guilt_level); | 98 GpuDataManagerImpl::DomainGuilt guilt_level); |
99 void TestUnblockingDomainFrom3DAPIs( | 99 void TestUnblockingDomainFrom3DAPIs( |
100 GpuDataManagerImpl::DomainGuilt guilt_level); | 100 GpuDataManagerImpl::DomainGuilt guilt_level); |
101 | 101 |
102 MessageLoop message_loop_; | 102 base::MessageLoop message_loop_; |
103 }; | 103 }; |
104 | 104 |
105 // We use new method instead of GetInstance() method because we want | 105 // We use new method instead of GetInstance() method because we want |
106 // each test to be independent of each other. | 106 // each test to be independent of each other. |
107 | 107 |
108 TEST_F(GpuDataManagerImplTest, GpuSideBlacklisting) { | 108 TEST_F(GpuDataManagerImplTest, GpuSideBlacklisting) { |
109 // If a feature is allowed in preliminary step (browser side), but | 109 // If a feature is allowed in preliminary step (browser side), but |
110 // disabled when GPU process launches and collects full GPU info, | 110 // disabled when GPU process launches and collects full GPU info, |
111 // it's too late to let renderer know, so we basically block all GPU | 111 // it's too late to let renderer know, so we basically block all GPU |
112 // access, to be on the safe side. | 112 // access, to be on the safe side. |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 CommandLine command_line(0, NULL); | 599 CommandLine command_line(0, NULL); |
600 manager->AppendGpuCommandLine(&command_line); | 600 manager->AppendGpuCommandLine(&command_line); |
601 | 601 |
602 EXPECT_TRUE(command_line.HasSwitch(switches::kGpuDriverBugWorkarounds)); | 602 EXPECT_TRUE(command_line.HasSwitch(switches::kGpuDriverBugWorkarounds)); |
603 std::string args = command_line.GetSwitchValueASCII( | 603 std::string args = command_line.GetSwitchValueASCII( |
604 switches::kGpuDriverBugWorkarounds); | 604 switches::kGpuDriverBugWorkarounds); |
605 EXPECT_STREQ("5,7", args.c_str()); | 605 EXPECT_STREQ("5,7", args.c_str()); |
606 } | 606 } |
607 | 607 |
608 } // namespace content | 608 } // namespace content |
OLD | NEW |