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

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

Issue 7068007: Revise about: and chrome: url handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update special_tabs.py from Nirnimesh's codereview.chromium.org/6995057/. Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_path.h" 5 #include "base/file_path.h"
6 #include "chrome/browser/ui/browser.h" 6 #include "chrome/browser/ui/browser.h"
7 #include "chrome/common/url_constants.h" 7 #include "chrome/common/url_constants.h"
8 #include "chrome/test/in_process_browser_test.h" 8 #include "chrome/test/in_process_browser_test.h"
9 #include "chrome/test/ui_test_utils.h" 9 #include "chrome/test/ui_test_utils.h"
10 #include "content/browser/tab_contents/navigation_entry.h" 10 #include "content/browser/tab_contents/navigation_entry.h"
11 #include "content/common/notification_type.h" 11 #include "content/common/notification_type.h"
12 #include "content/common/page_transition_types.h" 12 #include "content/common/page_transition_types.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace { 15 namespace {
16 16
17 void SimulateRendererCrash(Browser* browser) { 17 void SimulateRendererCrash(Browser* browser) {
18 browser->OpenURL(GURL(chrome::kAboutCrashURL), GURL(), CURRENT_TAB, 18 browser->OpenURL(GURL(chrome::kChromeUICrashURL), GURL(), CURRENT_TAB,
19 PageTransition::TYPED); 19 PageTransition::TYPED);
20 LOG(ERROR) << "SimulateRendererCrash, before WaitForNotification"; 20 LOG(ERROR) << "SimulateRendererCrash, before WaitForNotification";
21 ui_test_utils::WaitForNotification( 21 ui_test_utils::WaitForNotification(
22 NotificationType::TAB_CONTENTS_DISCONNECTED); 22 NotificationType::TAB_CONTENTS_DISCONNECTED);
23 LOG(ERROR) << "SimulateRendererCrash, after WaitForNotification"; 23 LOG(ERROR) << "SimulateRendererCrash, after WaitForNotification";
24 } 24 }
25 25
26 } // namespace 26 } // namespace
27 27
28 class CrashRecoveryBrowserTest : public InProcessBrowserTest { 28 class CrashRecoveryBrowserTest : public InProcessBrowserTest {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 &title_before_crash)); 70 &title_before_crash));
71 SimulateRendererCrash(browser()); 71 SimulateRendererCrash(browser());
72 browser()->Reload(CURRENT_TAB); 72 browser()->Reload(CURRENT_TAB);
73 LOG(ERROR) << "Before WaitForNavigationInCurrentTab"; 73 LOG(ERROR) << "Before WaitForNavigationInCurrentTab";
74 ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); 74 ASSERT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser()));
75 LOG(ERROR) << "After WaitForNavigationInCurrentTab"; 75 LOG(ERROR) << "After WaitForNavigationInCurrentTab";
76 ASSERT_TRUE(ui_test_utils::GetCurrentTabTitle(browser(), 76 ASSERT_TRUE(ui_test_utils::GetCurrentTabTitle(browser(),
77 &title_after_crash)); 77 &title_after_crash));
78 EXPECT_EQ(title_before_crash, title_after_crash); 78 EXPECT_EQ(title_before_crash, title_after_crash);
79 } 79 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698