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

Side by Side Diff: chrome/browser/extensions/extension_service_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chrome/browser/extensions/extension_service_unittest.h" 5 #include "chrome/browser/extensions/extension_service_unittest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 #include "chrome/test/base/testing_profile.h" 75 #include "chrome/test/base/testing_profile.h"
76 #include "components/user_prefs/pref_registry_syncable.h" 76 #include "components/user_prefs/pref_registry_syncable.h"
77 #include "content/public/browser/dom_storage_context.h" 77 #include "content/public/browser/dom_storage_context.h"
78 #include "content/public/browser/gpu_data_manager.h" 78 #include "content/public/browser/gpu_data_manager.h"
79 #include "content/public/browser/indexed_db_context.h" 79 #include "content/public/browser/indexed_db_context.h"
80 #include "content/public/browser/notification_registrar.h" 80 #include "content/public/browser/notification_registrar.h"
81 #include "content/public/browser/notification_service.h" 81 #include "content/public/browser/notification_service.h"
82 #include "content/public/browser/plugin_service.h" 82 #include "content/public/browser/plugin_service.h"
83 #include "content/public/browser/storage_partition.h" 83 #include "content/public/browser/storage_partition.h"
84 #include "content/public/common/content_constants.h" 84 #include "content/public/common/content_constants.h"
85 #include "content/public/common/gpu_info.h"
86 #include "content/public/test/test_browser_thread.h" 85 #include "content/public/test/test_browser_thread.h"
87 #include "extensions/common/constants.h" 86 #include "extensions/common/constants.h"
88 #include "extensions/common/extension_resource.h" 87 #include "extensions/common/extension_resource.h"
89 #include "extensions/common/url_pattern.h" 88 #include "extensions/common/url_pattern.h"
90 #include "googleurl/src/gurl.h" 89 #include "googleurl/src/gurl.h"
90 #include "gpu/config/gpu_info.h"
91 #include "grit/browser_resources.h" 91 #include "grit/browser_resources.h"
92 #include "net/cookies/canonical_cookie.h" 92 #include "net/cookies/canonical_cookie.h"
93 #include "net/cookies/cookie_monster.h" 93 #include "net/cookies/cookie_monster.h"
94 #include "net/cookies/cookie_options.h" 94 #include "net/cookies/cookie_options.h"
95 #include "net/url_request/url_request_context.h" 95 #include "net/url_request/url_request_context.h"
96 #include "net/url_request/url_request_context_getter.h" 96 #include "net/url_request/url_request_context_getter.h"
97 #include "sync/api/string_ordinal.h" 97 #include "sync/api/string_ordinal.h"
98 #include "sync/api/sync_error_factory.h" 98 #include "sync/api/sync_error_factory.h"
99 #include "sync/api/sync_error_factory_mock.h" 99 #include "sync/api/sync_error_factory_mock.h"
100 #include "sync/protocol/app_specifics.pb.h" 100 #include "sync/protocol/app_specifics.pb.h"
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 "{\n" 805 "{\n"
806 " \"name\": \"gpu blacklist\",\n" 806 " \"name\": \"gpu blacklist\",\n"
807 " \"version\": \"1.0\",\n" 807 " \"version\": \"1.0\",\n"
808 " \"entries\": [\n" 808 " \"entries\": [\n"
809 " {\n" 809 " {\n"
810 " \"id\": 1,\n" 810 " \"id\": 1,\n"
811 " \"features\": [\"webgl\"]\n" 811 " \"features\": [\"webgl\"]\n"
812 " }\n" 812 " }\n"
813 " ]\n" 813 " ]\n"
814 "}"; 814 "}";
815 content::GPUInfo gpu_info; 815 gpu::GPUInfo gpu_info;
816 content::GpuDataManager::GetInstance()->InitializeForTesting( 816 content::GpuDataManager::GetInstance()->InitializeForTesting(
817 json_blacklist, gpu_info); 817 json_blacklist, gpu_info);
818 } 818 }
819 819
820 void UpdateExtension(const std::string& id, const base::FilePath& in_path, 820 void UpdateExtension(const std::string& id, const base::FilePath& in_path,
821 UpdateState expected_state) { 821 UpdateState expected_state) {
822 ASSERT_TRUE(file_util::PathExists(in_path)); 822 ASSERT_TRUE(file_util::PathExists(in_path));
823 823
824 // We need to copy this to a temporary location because Update() will delete 824 // We need to copy this to a temporary location because Update() will delete
825 // it. 825 // it.
(...skipping 5134 matching lines...) Expand 10 before | Expand all | Expand 10 after
5960 new MockExtensionProvider(service_, Manifest::EXTERNAL_PREF); 5960 new MockExtensionProvider(service_, Manifest::EXTERNAL_PREF);
5961 AddMockExternalProvider(provider); 5961 AddMockExternalProvider(provider);
5962 provider->UpdateOrAddExtension(updates_from_webstore, "1", crx_path); 5962 provider->UpdateOrAddExtension(updates_from_webstore, "1", crx_path);
5963 5963
5964 service_->CheckForExternalUpdates(); 5964 service_->CheckForExternalUpdates();
5965 loop_.RunUntilIdle(); 5965 loop_.RunUntilIdle();
5966 EXPECT_TRUE(extensions::HasExternalInstallError(service_)); 5966 EXPECT_TRUE(extensions::HasExternalInstallError(service_));
5967 EXPECT_FALSE(extensions::HasExternalInstallBubble(service_)); 5967 EXPECT_FALSE(extensions::HasExternalInstallBubble(service_));
5968 EXPECT_FALSE(service_->IsExtensionEnabled(updates_from_webstore)); 5968 EXPECT_FALSE(service_->IsExtensionEnabled(updates_from_webstore));
5969 } 5969 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698