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

Side by Side Diff: chrome/browser/extensions/extension_service_unittest.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 "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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 #include "chrome/common/url_constants.h" 67 #include "chrome/common/url_constants.h"
68 #include "chrome/test/base/testing_profile.h" 68 #include "chrome/test/base/testing_profile.h"
69 #include "content/public/browser/dom_storage_context.h" 69 #include "content/public/browser/dom_storage_context.h"
70 #include "content/public/browser/gpu_data_manager.h" 70 #include "content/public/browser/gpu_data_manager.h"
71 #include "content/public/browser/indexed_db_context.h" 71 #include "content/public/browser/indexed_db_context.h"
72 #include "content/public/browser/notification_registrar.h" 72 #include "content/public/browser/notification_registrar.h"
73 #include "content/public/browser/notification_service.h" 73 #include "content/public/browser/notification_service.h"
74 #include "content/public/browser/plugin_service.h" 74 #include "content/public/browser/plugin_service.h"
75 #include "content/public/browser/storage_partition.h" 75 #include "content/public/browser/storage_partition.h"
76 #include "content/public/common/content_constants.h" 76 #include "content/public/common/content_constants.h"
77 #include "content/public/common/gpu_info.h"
77 #include "content/public/test/test_browser_thread.h" 78 #include "content/public/test/test_browser_thread.h"
78 #include "googleurl/src/gurl.h" 79 #include "googleurl/src/gurl.h"
79 #include "grit/browser_resources.h" 80 #include "grit/browser_resources.h"
80 #include "net/cookies/canonical_cookie.h" 81 #include "net/cookies/canonical_cookie.h"
81 #include "net/cookies/cookie_monster.h" 82 #include "net/cookies/cookie_monster.h"
82 #include "net/cookies/cookie_options.h" 83 #include "net/cookies/cookie_options.h"
83 #include "net/url_request/url_request_context.h" 84 #include "net/url_request/url_request_context.h"
84 #include "net/url_request/url_request_context_getter.h" 85 #include "net/url_request/url_request_context_getter.h"
85 #include "sync/api/string_ordinal.h" 86 #include "sync/api/string_ordinal.h"
86 #include "sync/api/sync_error_factory.h" 87 #include "sync/api/sync_error_factory.h"
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 "{\n" 725 "{\n"
725 " \"name\": \"gpu blacklist\",\n" 726 " \"name\": \"gpu blacklist\",\n"
726 " \"version\": \"1.0\",\n" 727 " \"version\": \"1.0\",\n"
727 " \"entries\": [\n" 728 " \"entries\": [\n"
728 " {\n" 729 " {\n"
729 " \"id\": 1,\n" 730 " \"id\": 1,\n"
730 " \"blacklist\": [\"webgl\"]\n" 731 " \"blacklist\": [\"webgl\"]\n"
731 " }\n" 732 " }\n"
732 " ]\n" 733 " ]\n"
733 "}"; 734 "}";
734 content::GpuDataManager::GetInstance()->Initialize("0", json_blacklist); 735 content::GPUInfo gpu_info;
736 content::GpuDataManager::GetInstance()->InitializeForTesting(
737 json_blacklist, gpu_info);
735 } 738 }
736 739
737 void UpdateExtension(const std::string& id, const FilePath& in_path, 740 void UpdateExtension(const std::string& id, const FilePath& in_path,
738 UpdateState expected_state) { 741 UpdateState expected_state) {
739 ASSERT_TRUE(file_util::PathExists(in_path)); 742 ASSERT_TRUE(file_util::PathExists(in_path));
740 743
741 // We need to copy this to a temporary location because Update() will delete 744 // We need to copy this to a temporary location because Update() will delete
742 // it. 745 // it.
743 FilePath path = temp_dir_.path(); 746 FilePath path = temp_dir_.path();
744 path = path.Append(in_path.BaseName()); 747 path = path.Append(in_path.BaseName());
(...skipping 4785 matching lines...) Expand 10 before | Expand all | Expand 10 after
5530 // This should NOT trigger an alert. 5533 // This should NOT trigger an alert.
5531 provider->UpdateOrAddExtension(hosted_app, "1.0.0.0", 5534 provider->UpdateOrAddExtension(hosted_app, "1.0.0.0",
5532 data_dir_.AppendASCII("hosted_app.crx")); 5535 data_dir_.AppendASCII("hosted_app.crx"));
5533 5536
5534 service_->CheckForExternalUpdates(); 5537 service_->CheckForExternalUpdates();
5535 loop_.RunAllPending(); 5538 loop_.RunAllPending();
5536 5539
5537 ASSERT_TRUE(service_->PopulateExtensionErrorUI(extension_error_ui.get())); 5540 ASSERT_TRUE(service_->PopulateExtensionErrorUI(extension_error_ui.get()));
5538 ASSERT_EQ(1u, extension_error_ui->get_external_extension_ids()->size()); 5541 ASSERT_EQ(1u, extension_error_ui->get_external_extension_ids()->size());
5539 } 5542 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698