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

Side by Side Diff: chrome/browser/crash_recovery_browsertest.cc

Issue 2373273002: Run unload handlers when navigating to about:blank using PlzNavigate. (Closed)
Patch Set: undo incorrect change that broke chrome://crash Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_resource_request_policy_apitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <utility> 5 #include <utility>
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 chrome::Reload(browser(), WindowOpenDisposition::CURRENT_TAB); 170 chrome::Reload(browser(), WindowOpenDisposition::CURRENT_TAB);
171 content::WaitForLoadStop(GetActiveWebContents()); 171 content::WaitForLoadStop(GetActiveWebContents());
172 ASSERT_EQ(url, GetActiveWebContents()->GetVisibleURL()); 172 ASSERT_EQ(url, GetActiveWebContents()->GetVisibleURL());
173 173
174 chrome::Reload(browser(), WindowOpenDisposition::CURRENT_TAB); 174 chrome::Reload(browser(), WindowOpenDisposition::CURRENT_TAB);
175 content::WaitForLoadStop(GetActiveWebContents()); 175 content::WaitForLoadStop(GetActiveWebContents());
176 ASSERT_EQ(url, GetActiveWebContents()->GetVisibleURL()); 176 ASSERT_EQ(url, GetActiveWebContents()->GetVisibleURL());
177 } 177 }
178 178
179 // Tests that a beforeunload handler doesn't run if user navigates to
180 // chrome::crash.
181 IN_PROC_BROWSER_TEST_F(CrashRecoveryBrowserTest, BeforeUnloadNotRun) {
182 const char* kBeforeUnloadHTML =
183 "<html><body>"
184 "<script>window.onbeforeunload=function(e){return 'foo'}</script>"
185 "</body></html>";
186 GURL url(std::string("data:text/html,") + kBeforeUnloadHTML);
187 ui_test_utils::NavigateToURL(browser(), url);
188 SimulateRendererCrash(browser());
189 }
190
179 } // namespace 191 } // namespace
180 192
181 #endif 193 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_resource_request_policy_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698