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

Unified Diff: chrome/browser/crash_recovery_browsertest.cc

Issue 2423243002: Fix regression where navigating to debug URLs didn't update the omnibox. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/crash_recovery_browsertest.cc
diff --git a/chrome/browser/crash_recovery_browsertest.cc b/chrome/browser/crash_recovery_browsertest.cc
index 9634546b07c78bd244ad3e08d1ae1ee4c992f3fb..2f96e82b66f26c50c754d4ae84e4978e64c3ba78 100644
--- a/chrome/browser/crash_recovery_browsertest.cc
+++ b/chrome/browser/crash_recovery_browsertest.cc
@@ -16,6 +16,8 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
+#include "content/public/browser/navigation_controller.h"
+#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/web_contents.h"
@@ -140,10 +142,10 @@ IN_PROC_BROWSER_TEST_F(CrashRecoveryBrowserTest, LoadInNewTab) {
const base::FilePath::CharType kTitle2File[] =
FILE_PATH_LITERAL("title2.html");
- ui_test_utils::NavigateToURL(
- browser(), ui_test_utils::GetTestUrl(
- base::FilePath(base::FilePath::kCurrentDirectory),
- base::FilePath(kTitle2File)));
+ GURL url(ui_test_utils::GetTestUrl(
+ base::FilePath(base::FilePath::kCurrentDirectory),
+ base::FilePath(kTitle2File)));
+ ui_test_utils::NavigateToURL(browser(), url);
base::string16 title_before_crash;
base::string16 title_after_crash;
@@ -151,6 +153,9 @@ IN_PROC_BROWSER_TEST_F(CrashRecoveryBrowserTest, LoadInNewTab) {
ASSERT_TRUE(ui_test_utils::GetCurrentTabTitle(browser(),
&title_before_crash));
SimulateRendererCrash(browser());
+ ASSERT_EQ(GURL(content::kChromeUICrashURL),
+ GetActiveWebContents()->GetController().GetVisibleEntry()->
+ GetVirtualURL());
chrome::Reload(browser(), WindowOpenDisposition::CURRENT_TAB);
content::WaitForLoadStop(GetActiveWebContents());
ASSERT_TRUE(ui_test_utils::GetCurrentTabTitle(browser(),
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698