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

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

Issue 11299326: Revert 170660 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 170888)
+++ chrome/browser/extensions/extension_browsertest.cc (working copy)
@@ -23,7 +23,6 @@
#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"
@@ -48,7 +47,6 @@
using extensions::Extension;
using extensions::ExtensionCreator;
using extensions::FeatureSwitch;
-using extensions::ShellWindowRegistry;
ExtensionBrowserTest::ExtensionBrowserTest()
: loaded_(false),
@@ -79,10 +77,6 @@
"TestUser@gmail.com");
command_line->AppendSwitchASCII(switches::kLoginProfile, "user");
#endif
-
- // Make event pages get suspended quicker.
- command_line->AppendSwitchASCII(switches::kEventPageIdleTime, "1");
- command_line->AppendSwitchASCII(switches::kEventPageUnloadingTime, "1");
}
const Extension* ExtensionBrowserTest::LoadExtensionWithFlags(
@@ -551,39 +545,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() {
- ExtensionProcessManager* manager =
- extensions::ExtensionSystem::Get(browser()->profile())->process_manager();
- // If there are no background hosts active, the app must have already exited.
- // This can happen if no windows were opened.
- if (manager->background_hosts().empty())
- return;
-
- 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