diff options
author | laforge@chromium.org <laforge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-25 23:02:49 +0000 |
---|---|---|
committer | laforge@chromium.org <laforge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-25 23:02:49 +0000 |
commit | cb48eafcefa0031b3203cecb6dba35b0a1a62ee4 (patch) | |
tree | 035c2cc76931308dc78722142254ffe66e379e61 | |
parent | bb8446d687de0593e5b4668a245cd7b7c70297ef (diff) | |
download | chromium_src-cb48eafcefa0031b3203cecb6dba35b0a1a62ee4.zip chromium_src-cb48eafcefa0031b3203cecb6dba35b0a1a62ee4.tar.gz chromium_src-cb48eafcefa0031b3203cecb6dba35b0a1a62ee4.tar.bz2 |
Revert 253267
Caused a compile failure: http://master.chrome.corp.google.com:8011/builders/mac%20stable/builds/901
> Merge 253006 "Clear any open dialogs when the renderer process g..."
>
> > Clear any open dialogs when the renderer process goes away.
> >
> > BUG=343625
> > TEST=See bug for repro steps.
> > R=darin@chromium.org
> >
> > Review URL: https://codereview.chromium.org/177123002
>
> TBR=creis@chromium.org
>
> Review URL: https://codereview.chromium.org/180433002
TBR=creis@chromium.org
Review URL: https://codereview.chromium.org/180123005
git-svn-id: svn://svn.chromium.org/chrome/branches/1750/src@253283 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/browser_browsertest.cc | 32 | ||||
-rw-r--r-- | content/browser/web_contents/web_contents_impl.cc | 4 |
2 files changed, 0 insertions, 36 deletions
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc index eeb6e4c..acaa74b 100644 --- a/chrome/browser/ui/browser_browsertest.cc +++ b/chrome/browser/ui/browser_browsertest.cc @@ -494,38 +494,6 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CrossProcessNavCancelsDialogs) { EXPECT_FALSE(contents->GetRenderProcessHost()->IgnoreInputEvents()); } -// Make sure that dialogs are closed after a renderer process dies, and that -// subsequent navigations work. See http://crbug/com/343265. -IN_PROC_BROWSER_TEST_F(BrowserTest, SadTabCancelsDialogs) { - ASSERT_TRUE(test_server()->Start()); - host_resolver()->AddRule("www.example.com", "127.0.0.1"); - GURL beforeunload_url(test_server()->GetURL("files/beforeunload.html")); - ui_test_utils::NavigateToURL(browser(), beforeunload_url); - - // Start a navigation to trigger the beforeunload dialog. - WebContents* contents = browser()->tab_strip_model()->GetActiveWebContents(); - contents->GetRenderViewHost()->ExecuteJavascriptInWebFrame( - base::string16(), - ASCIIToUTF16("window.location.href = 'data:text/html,foo'")); - AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog(); - EXPECT_TRUE(alert->IsValid()); - AppModalDialogQueue* dialog_queue = AppModalDialogQueue::GetInstance(); - EXPECT_TRUE(dialog_queue->HasActiveDialog()); - - // Crash the renderer process and ensure the dialog is gone. - content::RenderProcessHost* child_process = contents->GetRenderProcessHost(); - content::WindowedNotificationObserver crash_observer( - content::NOTIFICATION_RENDERER_PROCESS_CLOSED, - content::Source<content::RenderProcessHost>(process)); - base::KillProcess(child_process->GetHandle(), 0, false); - crash_observer.Wait(); - EXPECT_FALSE(dialog_queue->HasActiveDialog()); - - // Make sure subsequent navigations work. - GURL url2("http://www.example.com/files/empty.html"); - ui_test_utils::NavigateToURL(browser(), url2); -} - // Test for crbug.com/22004. Reloading a page with a before unload handler and // then canceling the dialog should not leave the throbber spinning. IN_PROC_BROWSER_TEST_F(BrowserTest, ReloadThenCancelBeforeUnload) { diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 6b6cf00..c5765d5 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -2895,10 +2895,6 @@ void WebContentsImpl::RenderViewTerminated(RenderViewHost* rvh, return; } - // Cancel any visible dialogs so they are not left dangling over the sad tab. - if (dialog_manager_) - dialog_manager_->CancelActiveAndPendingDialogs(this); - ClearPowerSaveBlockers(rvh); SetIsLoading(rvh, false, NULL); NotifyDisconnected(); |