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

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

Issue 126175: Close all browsers during InProcessBrowserTest cleanup, not just the main one... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/ref_counted.h" 5 #include "base/ref_counted.h"
6 #include "chrome/browser/browser.h" 6 #include "chrome/browser/browser.h"
7 #include "chrome/browser/browser_list.h" 7 #include "chrome/browser/browser_list.h"
8 #include "chrome/browser/renderer_host/render_view_host.h" 8 #include "chrome/browser/renderer_host/render_view_host.h"
9 #include "chrome/browser/extensions/extension_shelf.h" 9 #include "chrome/browser/extensions/extension_shelf.h"
10 #include "chrome/browser/extensions/extension_host.h" 10 #include "chrome/browser/extensions/extension_host.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 path = path.AppendASCII("extensions").AppendASCII("good.crx"); 156 path = path.AppendASCII("extensions").AppendASCII("good.crx");
157 ASSERT_TRUE(file_util::PathExists(path)); // sanity check 157 ASSERT_TRUE(file_util::PathExists(path)); // sanity check
158 158
159 // Wait for the extension to load and grab a pointer to it. 159 // Wait for the extension to load and grab a pointer to it.
160 TestExtensionLoader loader(browser()->profile()); 160 TestExtensionLoader loader(browser()->profile());
161 Extension* extension = loader.Install(kGoodCrxId, path); 161 Extension* extension = loader.Install(kGoodCrxId, path);
162 ASSERT_TRUE(extension); 162 ASSERT_TRUE(extension);
163 163
164 // TODO(mpcomplete): wait for uninstall to complete? 164 // TODO(mpcomplete): wait for uninstall to complete?
165 browser()->profile()->GetExtensionsService()->UninstallExtension(kGoodCrxId); 165 browser()->profile()->GetExtensionsService()->UninstallExtension(kGoodCrxId);
166
167 // Close our incognito window.
168 Browser* otr_browser = BrowserList::FindBrowserWithType(
169 browser()->profile()->GetOffTheRecordProfile(),
170 Browser::TYPE_NORMAL);
171 if (otr_browser)
172 otr_browser->CloseAllTabs();
173 } 166 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/in_process_browser_test.h » ('j') | chrome/test/in_process_browser_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698