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

Side by Side Diff: extensions/test/extensions_unittests_main.cc

Issue 413293003: extensions: Create extensions_pak target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 6 years, 4 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
« no previous file with comments | « extensions/extensions.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/base_paths.h" 5 #include "base/base_paths.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/test/launcher/unit_test_launcher.h" 9 #include "base/test/launcher/unit_test_launcher.h"
10 #include "content/public/common/content_client.h" 10 #include "content/public/common/content_client.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Register the chrome-extension:// scheme via this circuitous path. Note 67 // Register the chrome-extension:// scheme via this circuitous path. Note
68 // that this does not persistently set up a ContentClient; individual tests 68 // that this does not persistently set up a ContentClient; individual tests
69 // must use content::SetContentClient(). 69 // must use content::SetContentClient().
70 { 70 {
71 ExtensionsContentClient content_client; 71 ExtensionsContentClient content_client;
72 RegisterContentSchemes(&content_client); 72 RegisterContentSchemes(&content_client);
73 } 73 }
74 74
75 extensions::RegisterPathProvider(); 75 extensions::RegisterPathProvider();
76 76
77 base::FilePath resources_pack_path; 77 base::FilePath extensions_pak_path;
78 PathService::Get(base::DIR_MODULE, &resources_pack_path); 78 PathService::Get(base::DIR_MODULE, &extensions_pak_path);
79 ResourceBundle::InitSharedInstanceWithPakPath( 79 ui::ResourceBundle::InitSharedInstanceWithPakPath(
80 resources_pack_path.AppendASCII("extensions_unittests_resources.pak")); 80 extensions_pak_path.AppendASCII("extensions.pak"));
81 81
82 client_.reset(new extensions::TestExtensionsClient()); 82 client_.reset(new extensions::TestExtensionsClient());
83 extensions::ExtensionsClient::Set(client_.get()); 83 extensions::ExtensionsClient::Set(client_.get());
84 } 84 }
85 85
86 void ExtensionsTestSuite::Shutdown() { 86 void ExtensionsTestSuite::Shutdown() {
87 extensions::ExtensionsClient::Set(NULL); 87 extensions::ExtensionsClient::Set(NULL);
88 client_.reset(); 88 client_.reset();
89 89
90 ResourceBundle::CleanupSharedInstance(); 90 ui::ResourceBundle::CleanupSharedInstance();
91 content::ContentTestSuiteBase::Shutdown(); 91 content::ContentTestSuiteBase::Shutdown();
92 } 92 }
93 93
94 } // namespace 94 } // namespace
95 95
96 int main(int argc, char** argv) { 96 int main(int argc, char** argv) {
97 content::UnitTestTestSuite test_suite(new ExtensionsTestSuite(argc, argv)); 97 content::UnitTestTestSuite test_suite(new ExtensionsTestSuite(argc, argv));
98 98
99 return base::LaunchUnitTests(argc, 99 return base::LaunchUnitTests(argc,
100 argv, 100 argv,
101 base::Bind(&content::UnitTestTestSuite::Run, 101 base::Bind(&content::UnitTestTestSuite::Run,
102 base::Unretained(&test_suite))); 102 base::Unretained(&test_suite)));
103 } 103 }
OLDNEW
« no previous file with comments | « extensions/extensions.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698