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

Side by Side Diff: chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc

Issue 10911315: Move gpu blacklist data file to content side. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 5 #include <vector>
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "chrome/browser/extensions/bundle_installer.h" 10 #include "chrome/browser/extensions/bundle_installer.h"
11 #include "chrome/browser/extensions/extension_apitest.h" 11 #include "chrome/browser/extensions/extension_apitest.h"
12 #include "chrome/browser/extensions/extension_function_test_utils.h" 12 #include "chrome/browser/extensions/extension_function_test_utils.h"
13 #include "chrome/browser/extensions/extension_install_dialog.h" 13 #include "chrome/browser/extensions/extension_install_dialog.h"
14 #include "chrome/browser/extensions/extension_install_prompt.h" 14 #include "chrome/browser/extensions/extension_install_prompt.h"
15 #include "chrome/browser/extensions/extension_install_ui.h" 15 #include "chrome/browser/extensions/extension_install_ui.h"
16 #include "chrome/browser/extensions/extension_service.h" 16 #include "chrome/browser/extensions/extension_service.h"
17 #include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h" 17 #include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h"
18 #include "chrome/browser/extensions/webstore_installer.h" 18 #include "chrome/browser/extensions/webstore_installer.h"
19 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/ui/browser.h" 20 #include "chrome/browser/ui/browser.h"
21 #include "chrome/common/chrome_notification_types.h" 21 #include "chrome/common/chrome_notification_types.h"
22 #include "chrome/common/chrome_switches.h" 22 #include "chrome/common/chrome_switches.h"
23 #include "chrome/test/base/test_launcher_utils.h" 23 #include "chrome/test/base/test_launcher_utils.h"
24 #include "chrome/test/base/ui_test_utils.h" 24 #include "chrome/test/base/ui_test_utils.h"
25 #include "content/public/browser/gpu_data_manager.h" 25 #include "content/public/browser/gpu_data_manager.h"
26 #include "content/public/browser/notification_observer.h" 26 #include "content/public/browser/notification_observer.h"
27 #include "content/public/browser/notification_registrar.h" 27 #include "content/public/browser/notification_registrar.h"
28 #include "content/public/common/gpu_info.h"
28 #include "net/base/mock_host_resolver.h" 29 #include "net/base/mock_host_resolver.h"
29 #include "ui/gl/gl_switches.h" 30 #include "ui/gl/gl_switches.h"
30 31
31 using content::GpuFeatureType; 32 using content::GpuFeatureType;
32 33
33 namespace utils = extension_function_test_utils; 34 namespace utils = extension_function_test_utils;
34 35
35 namespace extensions { 36 namespace extensions {
36 37
37 namespace { 38 namespace {
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 " \"version\": \"1.0\",\n" 429 " \"version\": \"1.0\",\n"
429 " \"entries\": [\n" 430 " \"entries\": [\n"
430 " {\n" 431 " {\n"
431 " \"id\": 1,\n" 432 " \"id\": 1,\n"
432 " \"blacklist\": [\n" 433 " \"blacklist\": [\n"
433 " \"webgl\"\n" 434 " \"webgl\"\n"
434 " ]\n" 435 " ]\n"
435 " }\n" 436 " }\n"
436 " ]\n" 437 " ]\n"
437 "}"; 438 "}";
438 content::GpuDataManager::GetInstance()->Initialize("0", json_blacklist); 439 content::GPUInfo gpu_info;
440 content::GpuDataManager::GetInstance()->InitializeForTesting(
441 json_blacklist, gpu_info);
439 GpuFeatureType type = 442 GpuFeatureType type =
440 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); 443 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures();
441 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_WEBGL); 444 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_WEBGL);
442 445
443 bool webgl_allowed = false; 446 bool webgl_allowed = false;
444 RunTest(webgl_allowed); 447 RunTest(webgl_allowed);
445 } 448 }
446 449
447 } // namespace extensions 450 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chrome_gpu_util.cc ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698