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

Side by Side Diff: gpu/config/gpu_switching_list_unittest.cc

Issue 15385003: Move GPU device/driver info related code from content to gpu. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gpu/config/gpu_switching_list_json.cc ('k') | gpu/config/gpu_switching_option.h » ('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 (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 <vector> 5 #include <vector>
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "content/browser/gpu/gpu_control_list_jsons.h" 8 #include "gpu/config/gpu_control_list_jsons.h"
9 #include "content/browser/gpu/gpu_switching_list.h" 9 #include "gpu/config/gpu_info.h"
10 #include "content/public/common/gpu_info.h" 10 #include "gpu/config/gpu_switching_list.h"
11 #include "content/public/common/gpu_switching_option.h" 11 #include "gpu/config/gpu_switching_option.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 #define LONG_STRING_CONST(...) #__VA_ARGS__ 14 #define LONG_STRING_CONST(...) #__VA_ARGS__
15 15
16 const char kOsVersion[] = "10.6.4"; 16 const char kOsVersion[] = "10.6.4";
17 17
18 namespace content { 18 namespace gpu {
19 19
20 class GpuSwitchingListTest : public testing::Test { 20 class GpuSwitchingListTest : public testing::Test {
21 public: 21 public:
22 GpuSwitchingListTest() { } 22 GpuSwitchingListTest() { }
23 23
24 virtual ~GpuSwitchingListTest() { } 24 virtual ~GpuSwitchingListTest() { }
25 25
26 const GPUInfo& gpu_info() const { 26 const GPUInfo& gpu_info() const {
27 return gpu_info_; 27 return gpu_info_;
28 } 28 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 EXPECT_TRUE(switching_list->LoadList(json, GpuControlList::kAllOs)); 98 EXPECT_TRUE(switching_list->LoadList(json, GpuControlList::kAllOs));
99 switching = switching_list->MakeDecision( 99 switching = switching_list->MakeDecision(
100 GpuControlList::kOsWin, kOsVersion, gpu_info()); 100 GpuControlList::kOsWin, kOsVersion, gpu_info());
101 EXPECT_EQ(1u, switching.size()); 101 EXPECT_EQ(1u, switching.size());
102 EXPECT_EQ(1u, switching.count(GPU_SWITCHING_OPTION_FORCE_INTEGRATED)); 102 EXPECT_EQ(1u, switching.count(GPU_SWITCHING_OPTION_FORCE_INTEGRATED));
103 switching_list->GetDecisionEntries(&entries, false); 103 switching_list->GetDecisionEntries(&entries, false);
104 ASSERT_EQ(1u, entries.size()); 104 ASSERT_EQ(1u, entries.size());
105 EXPECT_EQ(2u, entries[0]); 105 EXPECT_EQ(2u, entries[0]);
106 } 106 }
107 107
108 } // namespace content 108 } // namespace gpu
109 109
OLDNEW
« no previous file with comments | « gpu/config/gpu_switching_list_json.cc ('k') | gpu/config/gpu_switching_option.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698