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

Unified Diff: content/browser/gpu/gpu_driver_bug_list_unittest.cc

Issue 15745014: Move GPU device/driver info related code from content to gpu. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/gpu_driver_bug_list_json.cc ('k') | content/browser/gpu/gpu_internals_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_driver_bug_list_unittest.cc
===================================================================
--- content/browser/gpu/gpu_driver_bug_list_unittest.cc (revision 201645)
+++ content/browser/gpu/gpu_driver_bug_list_unittest.cc (working copy)
@@ -1,81 +0,0 @@
-// Copyright (c) 2013 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/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "content/browser/gpu/gpu_control_list_jsons.h"
-#include "content/browser/gpu/gpu_driver_bug_list.h"
-#include "content/public/common/gpu_info.h"
-#include "gpu/command_buffer/service/gpu_driver_bug_workaround_type.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-const char kOsVersion[] = "10.6.4";
-
-namespace content {
-
-class GpuDriverBugListTest : public testing::Test {
- public:
- GpuDriverBugListTest() { }
-
- virtual ~GpuDriverBugListTest() { }
-
- const GPUInfo& gpu_info() const {
- return gpu_info_;
- }
-
- protected:
- virtual void SetUp() {
- gpu_info_.gpu.vendor_id = 0x10de;
- gpu_info_.gpu.device_id = 0x0640;
- gpu_info_.driver_vendor = "NVIDIA";
- gpu_info_.driver_version = "1.6.18";
- gpu_info_.driver_date = "7-14-2009";
- gpu_info_.machine_model = "MacBookPro 7.1";
- gpu_info_.gl_vendor = "NVIDIA Corporation";
- gpu_info_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine";
- gpu_info_.performance_stats.graphics = 5.0;
- gpu_info_.performance_stats.gaming = 5.0;
- gpu_info_.performance_stats.overall = 5.0;
- }
-
- virtual void TearDown() {
- }
-
- private:
- GPUInfo gpu_info_;
-};
-
-TEST_F(GpuDriverBugListTest, CurrentDriverBugListValidation) {
- scoped_ptr<GpuDriverBugList> list(GpuDriverBugList::Create());
- std::string json;
- EXPECT_TRUE(list->LoadList(kGpuDriverBugListJson, GpuControlList::kAllOs));
- EXPECT_FALSE(list->contains_unknown_fields());
-}
-
-TEST_F(GpuDriverBugListTest, CurrentListForARM) {
- scoped_ptr<GpuDriverBugList> list(GpuDriverBugList::Create());
- EXPECT_TRUE(list->LoadList(kGpuDriverBugListJson, GpuControlList::kAllOs));
-
- GPUInfo gpu_info;
- gpu_info.gl_vendor = "ARM";
- gpu_info.gl_renderer = "MALi_T604";
- std::set<int> bugs = list->MakeDecision(
- GpuControlList::kOsAndroid, "4.1", gpu_info);
- EXPECT_EQ(1u, bugs.count(gpu::USE_CLIENT_SIDE_ARRAYS_FOR_STREAM_BUFFERS));
-}
-
-TEST_F(GpuDriverBugListTest, CurrentListForImagination) {
- scoped_ptr<GpuDriverBugList> list(GpuDriverBugList::Create());
- EXPECT_TRUE(list->LoadList(kGpuDriverBugListJson, GpuControlList::kAllOs));
-
- GPUInfo gpu_info;
- gpu_info.gl_vendor = "Imagination Technologies";
- gpu_info.gl_renderer = "PowerVR SGX 540";
- std::set<int> bugs = list->MakeDecision(
- GpuControlList::kOsAndroid, "4.1", gpu_info);
- EXPECT_EQ(1u, bugs.count(gpu::USE_CLIENT_SIDE_ARRAYS_FOR_STREAM_BUFFERS));
-}
-
-} // namespace content
-
« no previous file with comments | « content/browser/gpu/gpu_driver_bug_list_json.cc ('k') | content/browser/gpu/gpu_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698