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

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

Issue 15385003: Move GPU device/driver info related code from content to gpu. (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 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_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h" 11 #include "chrome/browser/extensions/api/webstore_private/webstore_private_api.h"
12 #include "chrome/browser/extensions/bundle_installer.h" 12 #include "chrome/browser/extensions/bundle_installer.h"
13 #include "chrome/browser/extensions/extension_apitest.h" 13 #include "chrome/browser/extensions/extension_apitest.h"
14 #include "chrome/browser/extensions/extension_function_test_utils.h" 14 #include "chrome/browser/extensions/extension_function_test_utils.h"
15 #include "chrome/browser/extensions/extension_install_prompt.h" 15 #include "chrome/browser/extensions/extension_install_prompt.h"
16 #include "chrome/browser/extensions/extension_install_ui.h" 16 #include "chrome/browser/extensions/extension_install_ui.h"
17 #include "chrome/browser/extensions/extension_service.h" 17 #include "chrome/browser/extensions/extension_service.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/browser/ui/tabs/tab_strip_model.h" 21 #include "chrome/browser/ui/tabs/tab_strip_model.h"
22 #include "chrome/common/chrome_notification_types.h" 22 #include "chrome/common/chrome_notification_types.h"
23 #include "chrome/common/chrome_switches.h" 23 #include "chrome/common/chrome_switches.h"
24 #include "chrome/test/base/test_launcher_utils.h" 24 #include "chrome/test/base/test_launcher_utils.h"
25 #include "chrome/test/base/ui_test_utils.h" 25 #include "chrome/test/base/ui_test_utils.h"
26 #include "content/public/browser/gpu_data_manager.h" 26 #include "content/public/browser/gpu_data_manager.h"
27 #include "content/public/browser/notification_observer.h" 27 #include "content/public/browser/notification_observer.h"
28 #include "content/public/browser/notification_registrar.h" 28 #include "content/public/browser/notification_registrar.h"
29 #include "content/public/common/gpu_feature_type.h"
30 #include "content/public/common/gpu_info.h"
31 #include "content/public/test/browser_test_utils.h" 29 #include "content/public/test/browser_test_utils.h"
30 #include "gpu/config/gpu_feature_type.h"
31 #include "gpu/config/gpu_info.h"
32 #include "net/dns/mock_host_resolver.h" 32 #include "net/dns/mock_host_resolver.h"
33 #include "ui/gl/gl_switches.h" 33 #include "ui/gl/gl_switches.h"
34 34
35 using content::GpuFeatureType; 35 using gpu::GpuFeatureType;
36 36
37 namespace utils = extension_function_test_utils; 37 namespace utils = extension_function_test_utils;
38 38
39 namespace extensions { 39 namespace extensions {
40 40
41 namespace { 41 namespace {
42 42
43 class WebstoreInstallListener : public WebstoreInstaller::Delegate { 43 class WebstoreInstallListener : public WebstoreInstaller::Delegate {
44 public: 44 public:
45 WebstoreInstallListener() 45 WebstoreInstallListener()
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 " \"version\": \"1.0\",\n" 477 " \"version\": \"1.0\",\n"
478 " \"entries\": [\n" 478 " \"entries\": [\n"
479 " {\n" 479 " {\n"
480 " \"id\": 1,\n" 480 " \"id\": 1,\n"
481 " \"features\": [\n" 481 " \"features\": [\n"
482 " \"webgl\"\n" 482 " \"webgl\"\n"
483 " ]\n" 483 " ]\n"
484 " }\n" 484 " }\n"
485 " ]\n" 485 " ]\n"
486 "}"; 486 "}";
487 content::GPUInfo gpu_info; 487 gpu::GPUInfo gpu_info;
488 content::GpuDataManager::GetInstance()->InitializeForTesting( 488 content::GpuDataManager::GetInstance()->InitializeForTesting(
489 json_blacklist, gpu_info); 489 json_blacklist, gpu_info);
490 EXPECT_TRUE(content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( 490 EXPECT_TRUE(content::GpuDataManager::GetInstance()->IsFeatureBlacklisted(
491 content::GPU_FEATURE_TYPE_WEBGL)); 491 gpu::GPU_FEATURE_TYPE_WEBGL));
492 492
493 bool webgl_allowed = false; 493 bool webgl_allowed = false;
494 RunTest(webgl_allowed); 494 RunTest(webgl_allowed);
495 } 495 }
496 496
497 } // namespace extensions 497 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698