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

Unified Diff: chrome/browser/tab_contents/web_contents_unittest.cc

Issue 6627063: Ignore JavaScript messages (alert/confirm/prompt) during unload handlers. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added a browsertest Created 9 years, 9 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/tab_contents/background_contents.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/web_contents_unittest.cc
diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc
index 0bc146347e79dbafd0116de6b2462ee2b51e340b..eef704f6a902a7ddc5d716038f7c05623d33b8fb 100644
--- a/chrome/browser/tab_contents/web_contents_unittest.cc
+++ b/chrome/browser/tab_contents/web_contents_unittest.cc
@@ -1524,9 +1524,10 @@ TEST_F(TabContentsTest, NoJSMessageOnInterstitials) {
// attempting to show a JS message.
IPC::Message* dummy_message = new IPC::Message;
bool did_suppress_message = false;
+ const bool unload_handler_being_run = false;
contents()->RunJavaScriptMessage(L"This is an informative message", L"OK",
- kGURL, ui::MessageBoxFlags::kIsJavascriptAlert, dummy_message,
- &did_suppress_message);
+ kGURL, ui::MessageBoxFlags::kIsJavascriptAlert, unload_handler_being_run,
+ dummy_message, &did_suppress_message);
EXPECT_TRUE(did_suppress_message);
}
« no previous file with comments | « chrome/browser/tab_contents/background_contents.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698