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

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

Issue 10911187: Re-enable tests disabled for bug 136310 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Disable MultipartResponseTest.SingleVisit again Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/errorpage_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <set> 6 #include <set>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after
1834 navigation_observer.WaitForNavigations(1); 1834 navigation_observer.WaitForNavigations(1);
1835 1835
1836 EXPECT_EQ(1, navigation_observer.NumNavigationsForTab( 1836 EXPECT_EQ(1, navigation_observer.NumNavigationsForTab(
1837 chrome::GetWebContentsAt(browser(), 0))); 1837 chrome::GetWebContentsAt(browser(), 0)));
1838 EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE, 1838 EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE,
1839 GetStateOfTabReloaderAt(browser(), 0)); 1839 GetStateOfTabReloaderAt(browser(), 0));
1840 EXPECT_EQ(0, portal_observer.num_results_received()); 1840 EXPECT_EQ(0, portal_observer.num_results_received());
1841 } 1841 }
1842 1842
1843 // Checks that navigating back to a timeout triggers captive portal detection. 1843 // Checks that navigating back to a timeout triggers captive portal detection.
1844 // Disabled: http://crbug.com/136310 1844 IN_PROC_BROWSER_TEST_F(CaptivePortalBrowserTest, GoBackToTimeout) {
1845 IN_PROC_BROWSER_TEST_F(CaptivePortalBrowserTest, DISABLED_GoBackToTimeout) {
1846 // Disable captive portal detection so the first navigation doesn't open a 1845 // Disable captive portal detection so the first navigation doesn't open a
1847 // login tab. 1846 // login tab.
1848 EnableCaptivePortalDetection(browser()->profile(), false); 1847 EnableCaptivePortalDetection(browser()->profile(), false);
1849 1848
1850 SlowLoadNoCaptivePortal(browser(), RESULT_INTERNET_CONNECTED); 1849 SlowLoadNoCaptivePortal(browser(), RESULT_INTERNET_CONNECTED);
1851 1850
1852 // Navigate to a working page. 1851 // Navigate to a working page.
1853 ui_test_utils::NavigateToURL(browser(), 1852 ui_test_utils::NavigateToURL(browser(),
1854 URLRequestMockHTTPJob::GetMockUrl( 1853 URLRequestMockHTTPJob::GetMockUrl(
1855 FilePath(FILE_PATH_LITERAL("title2.html")))); 1854 FilePath(FILE_PATH_LITERAL("title2.html"))));
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 EXPECT_EQ(1, NumLoadingTabs()); 1892 EXPECT_EQ(1, NumLoadingTabs());
1894 1893
1895 SetSlowSSLLoadTime(tab_reloader, base::TimeDelta::FromDays(1)); 1894 SetSlowSSLLoadTime(tab_reloader, base::TimeDelta::FromDays(1));
1896 Login(browser(), 1, 0); 1895 Login(browser(), 1, 0);
1897 FailLoadsAfterLogin(browser(), 1); 1896 FailLoadsAfterLogin(browser(), 1);
1898 } 1897 }
1899 1898
1900 // Checks that reloading a timeout triggers captive portal detection. 1899 // Checks that reloading a timeout triggers captive portal detection.
1901 // Much like the last test, though the captive portal is disabled before 1900 // Much like the last test, though the captive portal is disabled before
1902 // the inital navigation, rather than captive portal detection. 1901 // the inital navigation, rather than captive portal detection.
1903 // Disabled: http://crbug.com/136310 1902 IN_PROC_BROWSER_TEST_F(CaptivePortalBrowserTest, ReloadTimeout) {
1904 IN_PROC_BROWSER_TEST_F(CaptivePortalBrowserTest, DISABLED_ReloadTimeout) {
1905 URLRequestMockCaptivePortalJobFactory::SetBehindCaptivePortal(false); 1903 URLRequestMockCaptivePortalJobFactory::SetBehindCaptivePortal(false);
1906 1904
1907 // Do the first navigation while not behind a captive portal. 1905 // Do the first navigation while not behind a captive portal.
1908 CaptivePortalObserver portal_observer(browser()->profile()); 1906 CaptivePortalObserver portal_observer(browser()->profile());
1909 ui_test_utils::NavigateToURL(browser(), GURL(kMockHttpsUrl)); 1907 ui_test_utils::NavigateToURL(browser(), GURL(kMockHttpsUrl));
1910 ASSERT_EQ(0, portal_observer.num_results_received()); 1908 ASSERT_EQ(0, portal_observer.num_results_received());
1911 ASSERT_EQ(1, browser()->tab_count()); 1909 ASSERT_EQ(1, browser()->tab_count());
1912 1910
1913 // A captive portal spontaneously appears. 1911 // A captive portal spontaneously appears.
1914 URLRequestMockCaptivePortalJobFactory::SetBehindCaptivePortal(true); 1912 URLRequestMockCaptivePortalJobFactory::SetBehindCaptivePortal(true);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
2075 base::Bind(&AddHstsHost, 2073 base::Bind(&AddHstsHost,
2076 make_scoped_refptr(browser()->profile()->GetRequestContext()), 2074 make_scoped_refptr(browser()->profile()->GetRequestContext()),
2077 http_timeout_url.host())); 2075 http_timeout_url.host()));
2078 2076
2079 SlowLoadBehindCaptivePortal(browser(), true, http_timeout_url); 2077 SlowLoadBehindCaptivePortal(browser(), true, http_timeout_url);
2080 Login(browser(), 1, 0); 2078 Login(browser(), 1, 0);
2081 FailLoadsAfterLogin(browser(), 1); 2079 FailLoadsAfterLogin(browser(), 1);
2082 } 2080 }
2083 2081
2084 } // namespace captive_portal 2082 } // namespace captive_portal
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/errorpage_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698