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

Side by Side Diff: chrome/gpu/gpu_info_unittest_win.cc

Issue 6346007: Refactor and improve gpu_info_collector: collect information on linux;... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: This should turn three trybots green Created 9 years, 11 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 | « chrome/gpu/gpu_info_collector_win.cc ('k') | gpu/gpu.gyp » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/scoped_ptr.h" 5 #include "base/scoped_ptr.h"
6 #include "chrome/common/gpu_info.h" 6 #include "chrome/common/gpu_info.h"
7 #include "chrome/gpu/gpu_idirect3d9_mock_win.h" 7 #include "chrome/gpu/gpu_idirect3d9_mock_win.h"
8 #include "chrome/gpu/gpu_info_collector.h" 8 #include "chrome/gpu/gpu_info_collector.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 TEST_F(GPUInfoTest, DeviceIdD3D) { 56 TEST_F(GPUInfoTest, DeviceIdD3D) {
57 GPUInfo gpu_info; 57 GPUInfo gpu_info;
58 ASSERT_TRUE(gpu_info_collector::CollectGraphicsInfoD3D(&d3d_, &gpu_info)); 58 ASSERT_TRUE(gpu_info_collector::CollectGraphicsInfoD3D(&d3d_, &gpu_info));
59 EXPECT_EQ(gpu_info.device_id(), 0x429); 59 EXPECT_EQ(gpu_info.device_id(), 0x429);
60 } 60 }
61 61
62 TEST_F(GPUInfoTest, DriverVersionD3D) { 62 TEST_F(GPUInfoTest, DriverVersionD3D) {
63 GPUInfo gpu_info; 63 GPUInfo gpu_info;
64 ASSERT_TRUE(gpu_info_collector::CollectGraphicsInfoD3D(&d3d_, &gpu_info)); 64 ASSERT_TRUE(gpu_info_collector::CollectGraphicsInfoD3D(&d3d_, &gpu_info));
65 std::wstring driver_version = gpu_info.driver_version(); 65 std::string driver_version = gpu_info.driver_version();
66 EXPECT_FALSE(driver_version.empty()); 66 EXPECT_FALSE(driver_version.empty());
67 EXPECT_EQ(driver_version, L"6.14.11.7715"); 67 EXPECT_EQ(driver_version, "6.14.11.7715");
68 } 68 }
69 69
70 TEST_F(GPUInfoTest, PixelShaderVersionD3D) { 70 TEST_F(GPUInfoTest, PixelShaderVersionD3D) {
71 GPUInfo gpu_info; 71 GPUInfo gpu_info;
72 ASSERT_TRUE(gpu_info_collector::CollectGraphicsInfoD3D(&d3d_, &gpu_info)); 72 ASSERT_TRUE(gpu_info_collector::CollectGraphicsInfoD3D(&d3d_, &gpu_info));
73 uint32 ps_version = gpu_info.pixel_shader_version(); 73 uint32 ps_version = gpu_info.pixel_shader_version();
74 EXPECT_EQ(ps_version, D3DPS_VERSION(3, 0)); 74 EXPECT_EQ(ps_version, D3DPS_VERSION(3, 0));
75 } 75 }
76 76
77 TEST_F(GPUInfoTest, VertexShaderVersionD3D) { 77 TEST_F(GPUInfoTest, VertexShaderVersionD3D) {
78 GPUInfo gpu_info; 78 GPUInfo gpu_info;
79 ASSERT_TRUE(gpu_info_collector::CollectGraphicsInfoD3D(&d3d_, &gpu_info)); 79 ASSERT_TRUE(gpu_info_collector::CollectGraphicsInfoD3D(&d3d_, &gpu_info));
80 uint32 vs_version = gpu_info.vertex_shader_version(); 80 uint32 vs_version = gpu_info.vertex_shader_version();
81 EXPECT_EQ(vs_version, D3DVS_VERSION(3, 0)); 81 EXPECT_EQ(vs_version, D3DVS_VERSION(3, 0));
82 } 82 }
OLDNEW
« no previous file with comments | « chrome/gpu/gpu_info_collector_win.cc ('k') | gpu/gpu.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698