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

Unified Diff: chrome/browser/extensions/extension_browsertest.cc

Issue 11362166: Merge 166715 - Revert r165772: Keep browser process alive while there are platform apps with backgr… (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1320/src/
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.h ('k') | chrome/browser/extensions/extension_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_browsertest.cc
===================================================================
--- chrome/browser/extensions/extension_browsertest.cc (revision 166732)
+++ chrome/browser/extensions/extension_browsertest.cc (working copy)
@@ -23,12 +23,10 @@
#include "chrome/browser/extensions/extension_install_prompt.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
-#include "chrome/browser/extensions/shell_window_registry.h"
#include "chrome/browser/extensions/unpacked_installer.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
-#include "chrome/browser/ui/extensions/shell_window.h"
#include "chrome/browser/ui/omnibox/location_bar.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_notification_types.h"
@@ -47,7 +45,6 @@
using extensions::Extension;
using extensions::ExtensionCreator;
using extensions::FeatureSwitch;
-using extensions::ShellWindowRegistry;
ExtensionBrowserTest::ExtensionBrowserTest()
: loaded_(false),
@@ -79,10 +76,6 @@
command_line->AppendSwitchASCII(switches::kLoginProfile, "user");
command_line->AppendSwitch(switches::kNoFirstRun);
#endif
-
- // Make event pages get suspended quicker.
- command_line->AppendSwitchASCII(switches::kEventPageIdleTime, "1");
- command_line->AppendSwitchASCII(switches::kEventPageUnloadingTime, "1");
}
const Extension* ExtensionBrowserTest::LoadExtensionWithFlags(
@@ -543,32 +536,6 @@
return crx_installers_done_observed_ == (before + 1);
}
-void ExtensionBrowserTest::CloseShellWindow(ShellWindow* window) {
- content::WindowedNotificationObserver destroyed_observer(
- content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
- content::NotificationService::AllSources());
- window->GetBaseWindow()->Close();
- destroyed_observer.Wait();
-}
-
-void ExtensionBrowserTest::CloseShellWindowsAndWaitForAppToExit() {
- content::WindowedNotificationObserver destroyed_observer(
- chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED,
- content::NotificationService::AllSources());
-
- // Close all the windows.
- ShellWindowRegistry* app_registry =
- ShellWindowRegistry::Get(browser()->profile());
- ShellWindowRegistry::const_iterator iter;
- ShellWindowRegistry::ShellWindowSet shell_windows =
- app_registry->shell_windows();
- for (iter = shell_windows.begin(); iter != shell_windows.end(); ++iter)
- CloseShellWindow(*iter);
-
- // Now wait for the lazy background page of the platform app to be unloaded.
- destroyed_observer.Wait();
-}
-
void ExtensionBrowserTest::OpenWindow(content::WebContents* contents,
const GURL& url,
bool newtab_process_should_equal_opener,
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.h ('k') | chrome/browser/extensions/extension_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698