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

Side by Side Diff: chrome/browser/captive_portal/captive_portal_browsertest.cc

Issue 2561983002: NavigationController: Reload methods migration (Closed)
Patch Set: one more mac build fix Created 4 years 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 <map> 5 #include <map>
6 #include <memory> 6 #include <memory>
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2617 matching lines...) Expand 10 before | Expand all | Expand 10 after
2628 2628
2629 // A captive portal spontaneously appears. 2629 // A captive portal spontaneously appears.
2630 factory_.SetBehindCaptivePortal(true); 2630 factory_.SetBehindCaptivePortal(true);
2631 2631
2632 CaptivePortalTabReloader* tab_reloader = 2632 CaptivePortalTabReloader* tab_reloader =
2633 GetTabReloader(tab_strip_model->GetActiveWebContents()); 2633 GetTabReloader(tab_strip_model->GetActiveWebContents());
2634 ASSERT_TRUE(tab_reloader); 2634 ASSERT_TRUE(tab_reloader);
2635 SetSlowSSLLoadTime(tab_reloader, base::TimeDelta()); 2635 SetSlowSSLLoadTime(tab_reloader, base::TimeDelta());
2636 2636
2637 MultiNavigationObserver navigation_observer; 2637 MultiNavigationObserver navigation_observer;
2638 tab_strip_model->GetActiveWebContents()->GetController().Reload(true); 2638 tab_strip_model->GetActiveWebContents()->GetController().Reload(
2639 content::ReloadType::NORMAL, true);
2639 2640
2640 // Wait for the check triggered by the broken tab and for the login tab to 2641 // Wait for the check triggered by the broken tab and for the login tab to
2641 // stop loading. 2642 // stop loading.
2642 portal_observer.WaitForResults(1); 2643 portal_observer.WaitForResults(1);
2643 navigation_observer.WaitForNavigations(1); 2644 navigation_observer.WaitForNavigations(1);
2644 // Make sure the request has been issued. 2645 // Make sure the request has been issued.
2645 URLRequestTimeoutOnDemandJob::WaitForJobs(1); 2646 URLRequestTimeoutOnDemandJob::WaitForJobs(1);
2646 2647
2647 ASSERT_EQ(1, portal_observer.num_results_received()); 2648 ASSERT_EQ(1, portal_observer.num_results_received());
2648 ASSERT_FALSE(CheckPending(browser())); 2649 ASSERT_FALSE(CheckPending(browser()));
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
2838 2839
2839 EXPECT_EQ(CaptivePortalTabReloader::STATE_NEEDS_RELOAD, 2840 EXPECT_EQ(CaptivePortalTabReloader::STATE_NEEDS_RELOAD,
2840 GetStateOfTabReloaderAt(browser(), broken_tab_index)); 2841 GetStateOfTabReloaderAt(browser(), broken_tab_index));
2841 2842
2842 WaitForInterstitialAttach(broken_tab_contents); 2843 WaitForInterstitialAttach(broken_tab_contents);
2843 portal_observer.WaitForResults(1); 2844 portal_observer.WaitForResults(1);
2844 2845
2845 EXPECT_EQ(SSLBlockingPage::kTypeForTesting, 2846 EXPECT_EQ(SSLBlockingPage::kTypeForTesting,
2846 GetInterstitialType(broken_tab_contents)); 2847 GetInterstitialType(broken_tab_contents));
2847 } 2848 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698