| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "content/gpu/gpu_info_collector.h" | 6 #include "content/gpu/gpu_info_collector.h" |
| 7 #include "content/public/common/gpu_info.h" | 7 #include "content/public/common/gpu_info.h" |
| 8 #include "gpu/command_buffer/common/gl_mock.h" | 8 #include "gpu/command_buffer/common/gl_mock.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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 const char* shader_version = "1.50"; | 61 const char* shader_version = "1.50"; |
| 62 const char* gl_version = "3.2"; | 62 const char* gl_version = "3.2"; |
| 63 const char* gl_renderer = "Quadro FX 380/PCI/SSE2"; | 63 const char* gl_renderer = "Quadro FX 380/PCI/SSE2"; |
| 64 const char* gl_vendor = "NVIDIA Corporation"; | 64 const char* gl_vendor = "NVIDIA Corporation"; |
| 65 const char* gl_version_string = "3.2.0 NVIDIA 195.36.24"; | 65 const char* gl_version_string = "3.2.0 NVIDIA 195.36.24"; |
| 66 const char* gl_shading_language_version = "1.50 NVIDIA via Cg compiler"; | 66 const char* gl_shading_language_version = "1.50 NVIDIA via Cg compiler"; |
| 67 const char* gl_extensions = | 67 const char* gl_extensions = |
| 68 "GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 " | 68 "GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 " |
| 69 "GL_EXT_read_format_bgra"; | 69 "GL_EXT_read_format_bgra"; |
| 70 #endif | 70 #endif |
| 71 test_values_.vendor_id = vendor_id; | 71 test_values_.gpu.vendor_id = vendor_id; |
| 72 test_values_.device_id = device_id; | 72 test_values_.gpu.device_id = device_id; |
| 73 test_values_.driver_vendor = driver_vendor; | 73 test_values_.driver_vendor = driver_vendor; |
| 74 test_values_.driver_version =driver_version; | 74 test_values_.driver_version =driver_version; |
| 75 test_values_.pixel_shader_version = shader_version; | 75 test_values_.pixel_shader_version = shader_version; |
| 76 test_values_.vertex_shader_version = shader_version; | 76 test_values_.vertex_shader_version = shader_version; |
| 77 test_values_.gl_version = gl_version; | 77 test_values_.gl_version = gl_version; |
| 78 test_values_.gl_renderer = gl_renderer; | 78 test_values_.gl_renderer = gl_renderer; |
| 79 test_values_.gl_vendor = gl_vendor; | 79 test_values_.gl_vendor = gl_vendor; |
| 80 test_values_.gl_version_string = gl_version_string; | 80 test_values_.gl_version_string = gl_version_string; |
| 81 test_values_.gl_extensions = gl_extensions; | 81 test_values_.gl_extensions = gl_extensions; |
| 82 test_values_.can_lose_context = false; | 82 test_values_.can_lose_context = false; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 EXPECT_EQ(test_values_.gl_vendor, | 172 EXPECT_EQ(test_values_.gl_vendor, |
| 173 gpu_info.gl_vendor); | 173 gpu_info.gl_vendor); |
| 174 } | 174 } |
| 175 | 175 |
| 176 TEST_F(GPUInfoCollectorTest, DISABLED_GLExtensionsGL) { | 176 TEST_F(GPUInfoCollectorTest, DISABLED_GLExtensionsGL) { |
| 177 content::GPUInfo gpu_info; | 177 content::GPUInfo gpu_info; |
| 178 gpu_info_collector::CollectGraphicsInfoGL(&gpu_info); | 178 gpu_info_collector::CollectGraphicsInfoGL(&gpu_info); |
| 179 EXPECT_EQ(test_values_.gl_extensions, | 179 EXPECT_EQ(test_values_.gl_extensions, |
| 180 gpu_info.gl_extensions); | 180 gpu_info.gl_extensions); |
| 181 } | 181 } |
| OLD | NEW |