| OLD | NEW |
| 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 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 2108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2119 EXPECT_EQ(1, portal_observer2.num_results_received()); | 2119 EXPECT_EQ(1, portal_observer2.num_results_received()); |
| 2120 EXPECT_EQ(captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL, | 2120 EXPECT_EQ(captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL, |
| 2121 portal_observer2.captive_portal_result()); | 2121 portal_observer2.captive_portal_result()); |
| 2122 EXPECT_EQ(0, NumLoadingTabs()); | 2122 EXPECT_EQ(0, NumLoadingTabs()); |
| 2123 EXPECT_FALSE(CheckPending(browser())); | 2123 EXPECT_FALSE(CheckPending(browser())); |
| 2124 EXPECT_EQ(1, browser()->tab_strip_model()->count()); | 2124 EXPECT_EQ(1, browser()->tab_strip_model()->count()); |
| 2125 EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE, | 2125 EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE, |
| 2126 GetStateOfTabReloaderAt(browser(), 0)); | 2126 GetStateOfTabReloaderAt(browser(), 0)); |
| 2127 } | 2127 } |
| 2128 | 2128 |
| 2129 // This test is very flaky on Linux and is disabled. |
| 2130 // https://crbug.com/453875 |
| 2131 #if defined(OS_LINUX) |
| 2132 #define MAYBE_InterstitialTimerNavigateAwayWhileLoading \ |
| 2133 DISABLED_InterstitialTimerNavigateAwayWhileLoading |
| 2134 #else |
| 2135 #define MAYBE_InterstitialTimerNavigateAwayWhileLoading \ |
| 2136 InterstitialTimerNavigateAwayWhileLoading |
| 2137 #endif |
| 2138 |
| 2129 // Same as above, but instead of reloading, the page is navigated away. The new | 2139 // Same as above, but instead of reloading, the page is navigated away. The new |
| 2130 // page should load, and no interstitials should be shown. | 2140 // page should load, and no interstitials should be shown. |
| 2131 IN_PROC_BROWSER_TEST_F(CaptivePortalBrowserTest, | 2141 IN_PROC_BROWSER_TEST_F(CaptivePortalBrowserTest, |
| 2132 InterstitialTimerNavigateAwayWhileLoading) { | 2142 MAYBE_InterstitialTimerNavigateAwayWhileLoading) { |
| 2133 net::SpawnedTestServer::SSLOptions https_options; | 2143 net::SpawnedTestServer::SSLOptions https_options; |
| 2134 https_options.server_certificate = | 2144 https_options.server_certificate = |
| 2135 net::SpawnedTestServer::SSLOptions::CERT_MISMATCHED_NAME; | 2145 net::SpawnedTestServer::SSLOptions::CERT_MISMATCHED_NAME; |
| 2136 net::SpawnedTestServer https_server( | 2146 net::SpawnedTestServer https_server( |
| 2137 net::SpawnedTestServer::TYPE_HTTPS, https_options, | 2147 net::SpawnedTestServer::TYPE_HTTPS, https_options, |
| 2138 base::FilePath(FILE_PATH_LITERAL("chrome/test/data"))); | 2148 base::FilePath(FILE_PATH_LITERAL("chrome/test/data"))); |
| 2139 ASSERT_TRUE(https_server.Start()); | 2149 ASSERT_TRUE(https_server.Start()); |
| 2140 // The path does not matter. | 2150 // The path does not matter. |
| 2141 GURL cert_error_url = https_server.GetURL(kTestServerLoginPath); | 2151 GURL cert_error_url = https_server.GetURL(kTestServerLoginPath); |
| 2142 | 2152 |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2712 | 2722 |
| 2713 EXPECT_EQ(CaptivePortalTabReloader::STATE_NEEDS_RELOAD, | 2723 EXPECT_EQ(CaptivePortalTabReloader::STATE_NEEDS_RELOAD, |
| 2714 GetStateOfTabReloaderAt(browser(), broken_tab_index)); | 2724 GetStateOfTabReloaderAt(browser(), broken_tab_index)); |
| 2715 | 2725 |
| 2716 WaitForInterstitialAttach(broken_tab_contents); | 2726 WaitForInterstitialAttach(broken_tab_contents); |
| 2717 portal_observer.WaitForResults(1); | 2727 portal_observer.WaitForResults(1); |
| 2718 | 2728 |
| 2719 EXPECT_EQ(SSLBlockingPage::kTypeForTesting, | 2729 EXPECT_EQ(SSLBlockingPage::kTypeForTesting, |
| 2720 GetInterstitialType(broken_tab_contents)); | 2730 GetInterstitialType(broken_tab_contents)); |
| 2721 } | 2731 } |
| OLD | NEW |