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

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

Issue 12210107: Fix issue 174250, crash when reloading packaged app. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: comments Created 7 years, 10 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 | « no previous file | 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 ab1838773bc6b7d391f922fa247f1da3ab6a87c1..47e07e5a39b53544a0196acb6366488e960b0348 100644
--- a/chrome/browser/extensions/platform_app_browsertest.cc
+++ b/chrome/browser/extensions/platform_app_browsertest.cc
@@ -27,6 +27,7 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/web_contents_modal_dialog_manager.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/devtools_agent_host.h"
@@ -766,7 +767,7 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, ReloadRelaunches) {
ASSERT_TRUE(launched_listener.WaitUntilSatisfied());
ASSERT_TRUE(GetFirstShellWindow());
- // Now tell the app to reload itself
+ // Now tell the app to reload itself.
ExtensionTestMessageListener launched_listener2("Launched", false);
launched_listener.Reply("reload");
ASSERT_TRUE(launched_listener2.WaitUntilSatisfied());
@@ -928,4 +929,22 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_WebContentsHasFocus) {
CloseShellWindow(window);
}
+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 | « no previous file | chrome/browser/extensions/shell_window_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698