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

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

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | 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/browser/ui/tab_contents/tab_contents_wrapper.h" 7 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
8 #include "chrome/common/url_constants.h" 8 #include "chrome/common/url_constants.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "chrome/test/base/ui_test_utils.h" 10 #include "chrome/test/base/ui_test_utils.h"
11 #include "content/browser/tab_contents/navigation_entry.h" 11 #include "content/browser/tab_contents/navigation_entry.h"
12 #include "content/common/content_notification_types.h" 12 #include "content/common/content_notification_types.h"
13 #include "content/common/page_transition_types.h" 13 #include "content/public/common/page_transition_types.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace { 16 namespace {
17 17
18 void SimulateRendererCrash(Browser* browser) { 18 void SimulateRendererCrash(Browser* browser) {
19 ui_test_utils::WindowedNotificationObserver observer( 19 ui_test_utils::WindowedNotificationObserver observer(
20 content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED, 20 content::NOTIFICATION_TAB_CONTENTS_DISCONNECTED,
21 NotificationService::AllSources()); 21 NotificationService::AllSources());
22 browser->OpenURL(GURL(chrome::kChromeUICrashURL), GURL(), CURRENT_TAB, 22 browser->OpenURL(GURL(chrome::kChromeUICrashURL), GURL(), CURRENT_TAB,
23 PageTransition::TYPED); 23 content::PAGE_TRANSITION_TYPED);
24 observer.Wait(); 24 observer.Wait();
25 } 25 }
26 26
27 } // namespace 27 } // namespace
28 28
29 class CrashRecoveryBrowserTest : public InProcessBrowserTest { 29 class CrashRecoveryBrowserTest : public InProcessBrowserTest {
30 }; 30 };
31 31
32 // Test that reload works after a crash. 32 // Test that reload works after a crash.
33 // Disabled, http://crbug.com/29331, http://crbug.com/69637. 33 // Disabled, http://crbug.com/29331, http://crbug.com/69637.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 ui_test_utils::WindowedNotificationObserver observer( 75 ui_test_utils::WindowedNotificationObserver observer(
76 content::NOTIFICATION_LOAD_STOP, 76 content::NOTIFICATION_LOAD_STOP,
77 Source<NavigationController>( 77 Source<NavigationController>(
78 &browser()->GetSelectedTabContentsWrapper()->controller())); 78 &browser()->GetSelectedTabContentsWrapper()->controller()));
79 browser()->Reload(CURRENT_TAB); 79 browser()->Reload(CURRENT_TAB);
80 observer.Wait(); 80 observer.Wait();
81 ASSERT_TRUE(ui_test_utils::GetCurrentTabTitle(browser(), 81 ASSERT_TRUE(ui_test_utils::GetCurrentTabTitle(browser(),
82 &title_after_crash)); 82 &title_after_crash));
83 EXPECT_EQ(title_before_crash, title_after_crash); 83 EXPECT_EQ(title_before_crash, title_after_crash);
84 } 84 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698