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

Side by Side Diff: chrome/browser/extensions/extension_startup_browsertest.cc

Issue 6693054: Get rid of extensions dependency from content\browser. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 command_line->AppendSwitch(switches::kDisableExtensionsFileAccessCheck); 71 command_line->AppendSwitch(switches::kDisableExtensionsFileAccessCheck);
72 } 72 }
73 } 73 }
74 74
75 virtual void TearDown() { 75 virtual void TearDown() {
76 EXPECT_TRUE(file_util::Delete(preferences_file_, false)); 76 EXPECT_TRUE(file_util::Delete(preferences_file_, false));
77 77
78 // TODO(phajdan.jr): Check return values of the functions below, carefully. 78 // TODO(phajdan.jr): Check return values of the functions below, carefully.
79 file_util::Delete(user_scripts_dir_, true); 79 file_util::Delete(user_scripts_dir_, true);
80 file_util::Delete(extensions_dir_, true); 80 file_util::Delete(extensions_dir_, true);
81
82 InProcessBrowserTest::TearDown();
81 } 83 }
82 84
83 void WaitForServicesToStart(int num_expected_extensions, 85 void WaitForServicesToStart(int num_expected_extensions,
84 bool expect_extensions_enabled) { 86 bool expect_extensions_enabled) {
85 ExtensionService* service = browser()->profile()->GetExtensionService(); 87 ExtensionService* service = browser()->profile()->GetExtensionService();
86 88
87 // Count the number of non-component extensions. 89 // Count the number of non-component extensions.
88 int found_extensions = 0; 90 int found_extensions = 0;
89 for (size_t i = 0; i < service->extensions()->size(); i++) 91 for (size_t i = 0; i < service->extensions()->size(); i++)
90 if (service->extensions()->at(i)->location() != Extension::COMPONENT) 92 if (service->extensions()->at(i)->location() != Extension::COMPONENT)
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 .AppendASCII("Extensions") 196 .AppendASCII("Extensions")
195 .AppendASCII("behllobkkfkfnphdnhnkndlbkcpglgmj") 197 .AppendASCII("behllobkkfkfnphdnhnkndlbkcpglgmj")
196 .AppendASCII("1.0.0.0"); 198 .AppendASCII("1.0.0.0");
197 } 199 }
198 }; 200 };
199 201
200 IN_PROC_BROWSER_TEST_F(ExtensionsLoadTest, Test) { 202 IN_PROC_BROWSER_TEST_F(ExtensionsLoadTest, Test) {
201 WaitForServicesToStart(1, true); 203 WaitForServicesToStart(1, true);
202 TestInjection(true, true); 204 TestInjection(true, true);
203 } 205 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_page_actions_module.cc ('k') | chrome/browser/extensions/extension_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698