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

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

Issue 15094006: Change gpu blacklists from json resource to const string. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/gtest/test_runner.py ('k') | content/browser/gpu/gpu_control_list_jsons.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_blacklist_unittest.cc
===================================================================
--- content/browser/gpu/gpu_blacklist_unittest.cc (revision 200312)
+++ content/browser/gpu/gpu_blacklist_unittest.cc (working copy)
@@ -2,12 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/base_paths.h"
-#include "base/file_util.h"
-#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
-#include "base/path_service.h"
#include "content/browser/gpu/gpu_blacklist.h"
+#include "content/browser/gpu/gpu_control_list_jsons.h"
#include "content/public/common/gpu_feature_type.h"
#include "content/public/common/gpu_info.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -80,23 +77,9 @@
};
TEST_F(GpuBlacklistTest, CurrentBlacklistValidation) {
- base::FilePath data_file;
- ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &data_file));
- data_file =
- data_file.Append(FILE_PATH_LITERAL("content"))
- .Append(FILE_PATH_LITERAL("browser"))
- .Append(FILE_PATH_LITERAL("gpu"))
- .Append(FILE_PATH_LITERAL("software_rendering_list.json"));
- ASSERT_TRUE(file_util::PathExists(data_file));
- int64 data_file_size64 = 0;
- ASSERT_TRUE(file_util::GetFileSize(data_file, &data_file_size64));
- int data_file_size = static_cast<int>(data_file_size64);
- scoped_ptr<char[]> data(new char[data_file_size]);
- ASSERT_EQ(data_file_size,
- file_util::ReadFile(data_file, data.get(), data_file_size));
- std::string json_string(data.get(), data_file_size);
scoped_ptr<GpuBlacklist> blacklist(GpuBlacklist::Create());
- EXPECT_TRUE(blacklist->LoadList(json_string, GpuBlacklist::kAllOs));
+ EXPECT_TRUE(blacklist->LoadList(
+ kSoftwareRenderingListJson, GpuBlacklist::kAllOs));
EXPECT_FALSE(blacklist->contains_unknown_fields());
}
« no previous file with comments | « build/android/pylib/gtest/test_runner.py ('k') | content/browser/gpu/gpu_control_list_jsons.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698