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, |