diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-09 21:41:05 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-09 21:41:05 +0000 |
commit | 7d7843067346da54c8f2dcf4c407eb3bf6ef56f9 (patch) | |
tree | 18e0b1008a6a0379018aac02e3caed8b009bf93c /chrome/browser/extensions/alert_apitest.cc | |
parent | 8af79b005cce6d0263655d81ce3861a4c8c2dc5e (diff) | |
download | chromium_src-7d7843067346da54c8f2dcf4c407eb3bf6ef56f9.zip chromium_src-7d7843067346da54c8f2dcf4c407eb3bf6ef56f9.tar.gz chromium_src-7d7843067346da54c8f2dcf4c407eb3bf6ef56f9.tar.bz2 |
Revert r44125
BUG=40439
TBR=sky@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44132 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/alert_apitest.cc')
-rw-r--r-- | chrome/browser/extensions/alert_apitest.cc | 50 |
1 files changed, 0 insertions, 50 deletions
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. -} |