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

Unified Diff: chrome/browser/task_manager_browsertest.cc

Issue 465007: Unload the entire extension when any part of it crashes. (Closed)
Patch Set: Created 11 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/extensions_service.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager_browsertest.cc
diff --git a/chrome/browser/task_manager_browsertest.cc b/chrome/browser/task_manager_browsertest.cc
index c1104ee5b0f8181633c861cb467852d4e82d5c12..01fe25e5d25594b99cdde0d6a7b796f4fa5fc6fb 100644
--- a/chrome/browser/task_manager_browsertest.cc
+++ b/chrome/browser/task_manager_browsertest.cc
@@ -119,6 +119,27 @@ IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, NoticeExtensionChanges) {
WaitForResourceChange(4);
}
+IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, KillExtension) {
+ // Show the task manager. This populates the model, and helps with debugging
+ // (you see the task manager).
+ browser()->window()->ShowTaskManager();
+
+ ASSERT_TRUE(LoadExtension(
+ test_data_dir_.AppendASCII("common").AppendASCII("background_page")));
+
+ // Wait until we see the loaded extension in the task manager (the three
+ // resources are: the browser process, New Tab Page, and the extension).
+ WaitForResourceChange(3);
+
+ EXPECT_TRUE(model()->GetResourceExtension(0) == NULL);
+ EXPECT_TRUE(model()->GetResourceExtension(1) == NULL);
+ ASSERT_TRUE(model()->GetResourceExtension(2) != NULL);
+
+ // Kill the extension process and make sure we notice it.
+ TaskManager::GetInstance()->KillProcess(2);
+ WaitForResourceChange(2);
+}
+
// Regression test for http://crbug.com/18693.
IN_PROC_BROWSER_TEST_F(TaskManagerBrowserTest, ReloadExtension) {
// Show the task manager. This populates the model, and helps with debugging
« no previous file with comments | « chrome/browser/extensions/extensions_service.cc ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698