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

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

Issue 20243003: Fix crash when reloading packaged app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to after mac app shim fix Created 7 years, 4 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
« no previous file with comments | « apps/shell_window.cc ('k') | chrome/browser/extensions/shell_window_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 55cf56d3876b34f725096aa9a665c7d430d7e9f8..7d13d5e36958cabe4b38cc654c4daecb0dd36021 100644
--- a/chrome/browser/extensions/platform_app_browsertest.cc
+++ b/chrome/browser/extensions/platform_app_browsertest.cc
@@ -34,6 +34,7 @@
#include "chrome/browser/ui/extensions/native_app_window.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/test_switches.h"
#include "chrome/test/base/ui_test_utils.h"
@@ -1083,5 +1084,22 @@ IN_PROC_BROWSER_TEST_F(PlatformAppIncognitoBrowserTest, IncognitoComponentApp) {
#endif // defined(OS_CHROMEOS)
+IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, DontCrashWhenReloading) {
+ // Regression test for http://crbug.com/174250
+ browser()->profile()->GetPrefs()->SetBoolean(
+ prefs::kExtensionsUIDeveloperMode, true);
+ ui_test_utils::NavigateToURL(browser(), GURL("chrome://extensions"));
+ ExtensionTestMessageListener launched_listener("Launched", true);
+ const Extension* extension = LoadAndLaunchPlatformApp("reload");
+ ASSERT_TRUE(extension);
+ ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
+ ASSERT_TRUE(GetFirstShellWindow());
+
+ // Now tell the app to reload itself.
+ ExtensionTestMessageListener launched_listener2("Launched", false);
+ launched_listener.Reply("reload");
+ ASSERT_TRUE(launched_listener2.WaitUntilSatisfied());
+ ASSERT_TRUE(GetFirstShellWindow());
+}
} // namespace extensions
« no previous file with comments | « apps/shell_window.cc ('k') | chrome/browser/extensions/shell_window_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698