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

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

Issue 7612016: Tie extension/app initialization to RenderView creation, not RenderViewHost creation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment.x Created 9 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 | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/extensions/isolated_app_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/app_process_apitest.cc
diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc
index eb83b1772989cc68f61fe0b29e7665bb702a1fd3..d0b2903c081d57e9f845cab351dd75002cb17c09 100644
--- a/chrome/browser/extensions/app_process_apitest.cc
+++ b/chrome/browser/extensions/app_process_apitest.cc
@@ -338,3 +338,33 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, OpenAppFromIframe) {
EXPECT_TRUE(last_active_browser->GetTabContentsAt(0)->render_view_host()->
process()->is_extension_process());
}
+
+IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadAppAfterCrash) {
+ host_resolver()->AddRule("*", "127.0.0.1");
+ ASSERT_TRUE(test_server()->Start());
+
+ ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("app_process")));
+
+ GURL base_url = GetTestBaseURL("app_process");
+
+ // Load the app, chrome.app.isInstalled should be true.
+ ui_test_utils::NavigateToURL(browser(), base_url.Resolve("path1/empty.html"));
+ TabContents* contents = browser()->GetTabContentsAt(0);
+ EXPECT_TRUE(contents->render_view_host()->process()->is_extension_process());
+ bool is_installed = false;
+ ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
+ contents->render_view_host(), L"",
+ L"window.domAutomationController.send(chrome.app.isInstalled)",
+ &is_installed));
+ ASSERT_TRUE(is_installed);
+
+ // Crash the tab and reload it, chrome.app.isInstalled should still be true.
+ ui_test_utils::CrashTab(browser()->GetSelectedTabContents());
+ browser()->Reload(CURRENT_TAB);
+ ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser()));
+ ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
+ contents->render_view_host(), L"",
+ L"window.domAutomationController.send(chrome.app.isInstalled)",
+ &is_installed));
+ ASSERT_TRUE(is_installed);
+}
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/extensions/isolated_app_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698