From 7d7843067346da54c8f2dcf4c407eb3bf6ef56f9 Mon Sep 17 00:00:00 2001
From: "aa@chromium.org" <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Fri, 9 Apr 2010 21:41:05 +0000
Subject: Revert r44125 BUG=40439

TBR=sky@chromium.org

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44132 0039d316-1c4b-4281-b951-d872f2087c98
---
 chrome/browser/extensions/alert_apitest.cc | 50 ------------------------------
 1 file changed, 50 deletions(-)

(limited to 'chrome/browser/extensions/alert_apitest.cc')

diff --git a/chrome/browser/extensions/alert_apitest.cc b/chrome/browser/extensions/alert_apitest.cc
index 7bb8448..23e8fe8 100644
--- a/chrome/browser/extensions/alert_apitest.cc
+++ b/chrome/browser/extensions/alert_apitest.cc
@@ -7,8 +7,6 @@
 #include "chrome/browser/extensions/extension_apitest.h"
 #include "chrome/browser/extensions/extension_host.h"
 #include "chrome/browser/extensions/extension_process_manager.h"
-#include "chrome/browser/extensions/extensions_service.h"
-#include "chrome/browser/renderer_host/render_process_host.h"
 #include "chrome/browser/renderer_host/render_view_host.h"
 #include "chrome/browser/profile.h"
 #include "chrome/test/ui_test_utils.h"
@@ -20,58 +18,10 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, AlertBasic) {
   ExtensionHost* host = browser()->profile()->GetExtensionProcessManager()->
       GetBackgroundHostForExtension(extension);
   ASSERT_TRUE(host);
-
   host->render_view_host()->ExecuteJavascriptInWebFrame(L"",
       L"alert('This should not crash.');");
 
   AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog();
   ASSERT_TRUE(alert);
-  ASSERT_TRUE(alert->IsValid());
-
   alert->CloseModalDialog();
 }
-
-// Test that we handle the case of an extension being unloaded while an alert is
-// up gracefully.
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, AlertOrphanedByUnload) {
-  ASSERT_TRUE(RunExtensionTest("alert")) << message_;
-
-  Extension* extension = GetSingleLoadedExtension();
-  ExtensionHost* host = browser()->profile()->GetExtensionProcessManager()->
-      GetBackgroundHostForExtension(extension);
-  ASSERT_TRUE(host);
-
-  host->render_view_host()->ExecuteJavascriptInWebFrame(L"",
-      L"alert('This should not crash.');");
-
-  AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog();
-  ASSERT_TRUE(alert);
-
-  browser()->profile()->GetExtensionsService()->UnloadExtension(
-      extension->id());
-
-  ASSERT_FALSE(alert->IsValid());
-}
-
-// Test that we handle the case of an extension crashing while an alert is up
-// gracefully.
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, AlertOrphanedByCrash) {
-  ASSERT_TRUE(RunExtensionTest("alert")) << message_;
-
-  Extension* extension = GetSingleLoadedExtension();
-  ExtensionHost* host = browser()->profile()->GetExtensionProcessManager()->
-      GetBackgroundHostForExtension(extension);
-  ASSERT_TRUE(host);
-
-  host->render_view_host()->ExecuteJavascriptInWebFrame(L"",
-      L"alert('This should not crash.');");
-
-  AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog();
-  ASSERT_TRUE(alert);
-
-  base::KillProcess(
-    browser()->profile()->GetExtensionProcessManager()->GetExtensionProcess(
-        extension->id())->GetHandle(),
-    base::PROCESS_END_KILLED_BY_USER,
-    true);  // Wait for process to exit.
-}
-- 
cgit v1.1