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

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

Issue 11829055: Create top level apps component and move some apps code there. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/platform_app_browsertest.cc
diff --git a/chrome/browser/extensions/platform_app_browsertest.cc b/chrome/browser/extensions/platform_app_browsertest.cc
index 7d0dc46f0241d3cc62032f52ac89653162a338e9..2e41a9028499ac1c69fdaf527eb30dc0d3c545f0 100644
--- a/chrome/browser/extensions/platform_app_browsertest.cc
+++ b/chrome/browser/extensions/platform_app_browsertest.cc
@@ -10,8 +10,6 @@
#include "chrome/browser/automation/automation_util.h"
#include "chrome/browser/devtools/devtools_window.h"
#include "chrome/browser/extensions/api/permissions/permissions_api.h"
-#include "chrome/browser/extensions/app_restore_service.h"
-#include "chrome/browser/extensions/app_restore_service_factory.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -654,37 +652,6 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
ASSERT_TRUE(done2_listener.WaitUntilSatisfied());
}
-// Tests that a running app is recorded in the preferences as such.
-IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, RunningAppsAreRecorded) {
- content::WindowedNotificationObserver extension_suspended(
- chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED,
- content::NotificationService::AllSources());
-
- const Extension* extension = LoadExtension(
- test_data_dir_.AppendASCII("platform_apps/restart_test"));
- ASSERT_TRUE(extension);
- ExtensionService* extension_service =
- ExtensionSystem::Get(browser()->profile())->extension_service();
- ExtensionPrefs* extension_prefs = extension_service->extension_prefs();
-
- // App is running.
- ASSERT_TRUE(extension_prefs->IsExtensionRunning(extension->id()));
-
- // Wait for the extension to get suspended.
- extension_suspended.Wait();
-
- // App isn't running because it got suspended.
- ASSERT_FALSE(extension_prefs->IsExtensionRunning(extension->id()));
-
- // Pretend that the app is supposed to be running.
- extension_prefs->SetExtensionRunning(extension->id(), true);
-
- ExtensionTestMessageListener restart_listener("onRestarted", false);
- AppRestoreServiceFactory::GetForProfile(browser()->profile())->
- HandleStartup(true);
- restart_listener.WaitUntilSatisfied();
-}
-
namespace {
class PlatformAppDevToolsBrowserTest : public PlatformAppBrowserTest {
« no previous file with comments | « chrome/browser/extensions/app_restore_service_factory.cc ('k') | chrome/browser/profiles/profile_dependency_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698