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

Unified Diff: content/gpu/gpu_info_collector_unittest_win.cc

Issue 11576056: Attempt to reland r173248,173259 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/gpu/gpu_info_collector_mac.mm ('k') | content/gpu/gpu_info_collector_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_info_collector_unittest_win.cc
===================================================================
--- content/gpu/gpu_info_collector_unittest_win.cc (revision 173496)
+++ content/gpu/gpu_info_collector_unittest_win.cc (working copy)
@@ -1,56 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/memory/scoped_ptr.h"
-#include "content/gpu/gpu_idirect3d9_mock_win.h"
-#include "content/gpu/gpu_info_collector.h"
-#include "content/public/common/gpu_info.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-using ::testing::_;
-using ::testing::Return;
-using ::testing::SetArgumentPointee;
-
-class GPUInfoTest : public testing::Test {
- public:
- GPUInfoTest() { }
- virtual ~GPUInfoTest() { }
-
- protected:
- void SetUp() {
- // Test variables taken from Lenovo T61
- test_identifier_.VendorId = 0x10de;
- test_identifier_.DeviceId = 0x429;
- test_identifier_.DriverVersion.QuadPart = 0x6000e000b1e23; // 6.14.11.7715
- test_caps_.PixelShaderVersion = 0xffff0300; // 3.0
- test_caps_.VertexShaderVersion = 0xfffe0300; // 3.0
-
- EXPECT_CALL(d3d_, GetDeviceCaps(_, _, _))
- .WillOnce(DoAll(SetArgumentPointee<2>(test_caps_),
- Return(D3D_OK)));
- EXPECT_CALL(d3d_, QueryInterface(__uuidof(IDirect3D9Ex), _))
- .WillOnce(Return(E_NOINTERFACE));
- }
- void TearDown() {
- }
-
- public:
- IDirect3D9Mock d3d_;
- private:
- D3DADAPTER_IDENTIFIER9 test_identifier_;
- D3DCAPS9 test_caps_;
-};
-
-TEST_F(GPUInfoTest, PixelShaderVersionD3D) {
- content::GPUInfo gpu_info;
- ASSERT_TRUE(gpu_info_collector::CollectGraphicsInfoD3D(&d3d_, &gpu_info));
- EXPECT_EQ(gpu_info.pixel_shader_version, "3.0");
-}
-
-TEST_F(GPUInfoTest, VertexShaderVersionD3D) {
- content::GPUInfo gpu_info;
- ASSERT_TRUE(gpu_info_collector::CollectGraphicsInfoD3D(&d3d_, &gpu_info));
- EXPECT_EQ(gpu_info.vertex_shader_version, "3.0");
-}
« no previous file with comments | « content/gpu/gpu_info_collector_mac.mm ('k') | content/gpu/gpu_info_collector_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698