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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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
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 "chrome/app/chrome_command_ids.h" 5 #include "chrome/app/chrome_command_ids.h"
6 #include "chrome/browser/chrome_notification_types.h" 6 #include "chrome/browser/chrome_notification_types.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" 8 #include "chrome/browser/ui/tabs/tab_strip_model.h"
9 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 web_contents->GetController().Reload(true); 68 web_contents->GetController().Reload(true);
69 69
70 // Navigate to a page that requires authentication, bringing up another 70 // Navigate to a page that requires authentication, bringing up another
71 // tab-modal sheet. 71 // tab-modal sheet.
72 content::NavigationController& controller = web_contents->GetController(); 72 content::NavigationController& controller = web_contents->GetController();
73 content::WindowedNotificationObserver observer( 73 content::WindowedNotificationObserver observer(
74 chrome::NOTIFICATION_AUTH_NEEDED, 74 chrome::NOTIFICATION_AUTH_NEEDED,
75 content::Source<content::NavigationController>(&controller)); 75 content::Source<content::NavigationController>(&controller));
76 browser()->OpenURL(content::OpenURLParams( 76 browser()->OpenURL(content::OpenURLParams(
77 embedded_test_server()->GetURL("/auth-basic"), content::Referrer(), 77 embedded_test_server()->GetURL("/auth-basic"), content::Referrer(),
78 CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); 78 WindowOpenDisposition::CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false));
79 observer.Wait(); 79 observer.Wait();
80 80
81 // Try to reload it again. 81 // Try to reload it again.
82 web_contents->GetController().Reload(true); 82 web_contents->GetController().Reload(true);
83 83
84 // Navigate away from the page. We can't use ui_test_utils:NavigateToURL 84 // Navigate away from the page. We can't use ui_test_utils:NavigateToURL
85 // because that waits for the current page to stop loading first, which won't 85 // because that waits for the current page to stop loading first, which won't
86 // happen while the auth dialog is up. 86 // happen while the auth dialog is up.
87 content::TestNavigationObserver navigation_observer(web_contents); 87 content::TestNavigationObserver navigation_observer(web_contents);
88 browser()->OpenURL(content::OpenURLParams( 88 browser()->OpenURL(content::OpenURLParams(
89 embedded_test_server()->GetURL("/bar"), content::Referrer(), CURRENT_TAB, 89 embedded_test_server()->GetURL("/bar"), content::Referrer(),
90 ui::PAGE_TRANSITION_TYPED, false)); 90 WindowOpenDisposition::CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false));
91 navigation_observer.Wait(); 91 navigation_observer.Wait();
92 } 92 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698