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 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2063 EXPECT_EQ(1, portal_observer2.num_results_received()); | 2063 EXPECT_EQ(1, portal_observer2.num_results_received()); |
2064 EXPECT_EQ(captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL, | 2064 EXPECT_EQ(captive_portal::RESULT_BEHIND_CAPTIVE_PORTAL, |
2065 portal_observer2.captive_portal_result()); | 2065 portal_observer2.captive_portal_result()); |
2066 EXPECT_EQ(0, NumLoadingTabs()); | 2066 EXPECT_EQ(0, NumLoadingTabs()); |
2067 EXPECT_FALSE(CheckPending(browser())); | 2067 EXPECT_FALSE(CheckPending(browser())); |
2068 EXPECT_EQ(1, browser()->tab_strip_model()->count()); | 2068 EXPECT_EQ(1, browser()->tab_strip_model()->count()); |
2069 EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE, | 2069 EXPECT_EQ(CaptivePortalTabReloader::STATE_NONE, |
2070 GetStateOfTabReloaderAt(browser(), 0)); | 2070 GetStateOfTabReloaderAt(browser(), 0)); |
2071 } | 2071 } |
2072 | 2072 |
| 2073 // This test is very flaky on Linux and is disabled. |
| 2074 // https://crbug.com/453875 |
| 2075 #if defined(OS_LINUX) |
| 2076 #define MAYBE_InterstitialTimerReloadWhileLoading \ |
| 2077 DISABLED_InterstitialTimerReloadWhileLoading |
| 2078 #else |
| 2079 #define MAYBE_InterstitialTimerReloadWhileLoading \ |
| 2080 InterstitialTimerReloadWhileLoading |
| 2081 #endif |
2073 // Same as above, but instead of stopping, the loading page is reloaded. The end | 2082 // Same as above, but instead of stopping, the loading page is reloaded. The end |
2074 // result is the same. (i.e. page load stops, no interstitials shown) | 2083 // result is the same. (i.e. page load stops, no interstitials shown) |
2075 IN_PROC_BROWSER_TEST_F(CaptivePortalBrowserTest, | 2084 IN_PROC_BROWSER_TEST_F(CaptivePortalBrowserTest, |
2076 InterstitialTimerReloadWhileLoading) { | 2085 MAYBE_InterstitialTimerReloadWhileLoading) { |
2077 net::SpawnedTestServer::SSLOptions https_options; | 2086 net::SpawnedTestServer::SSLOptions https_options; |
2078 https_options.server_certificate = | 2087 https_options.server_certificate = |
2079 net::SpawnedTestServer::SSLOptions::CERT_MISMATCHED_NAME; | 2088 net::SpawnedTestServer::SSLOptions::CERT_MISMATCHED_NAME; |
2080 net::SpawnedTestServer https_server( | 2089 net::SpawnedTestServer https_server( |
2081 net::SpawnedTestServer::TYPE_HTTPS, https_options, | 2090 net::SpawnedTestServer::TYPE_HTTPS, https_options, |
2082 base::FilePath(FILE_PATH_LITERAL("chrome/test/data"))); | 2091 base::FilePath(FILE_PATH_LITERAL("chrome/test/data"))); |
2083 ASSERT_TRUE(https_server.Start()); | 2092 ASSERT_TRUE(https_server.Start()); |
2084 // The path does not matter. | 2093 // The path does not matter. |
2085 GURL cert_error_url = https_server.GetURL(kTestServerLoginPath); | 2094 GURL cert_error_url = https_server.GetURL(kTestServerLoginPath); |
2086 | 2095 |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2722 | 2731 |
2723 EXPECT_EQ(CaptivePortalTabReloader::STATE_NEEDS_RELOAD, | 2732 EXPECT_EQ(CaptivePortalTabReloader::STATE_NEEDS_RELOAD, |
2724 GetStateOfTabReloaderAt(browser(), broken_tab_index)); | 2733 GetStateOfTabReloaderAt(browser(), broken_tab_index)); |
2725 | 2734 |
2726 WaitForInterstitialAttach(broken_tab_contents); | 2735 WaitForInterstitialAttach(broken_tab_contents); |
2727 portal_observer.WaitForResults(1); | 2736 portal_observer.WaitForResults(1); |
2728 | 2737 |
2729 EXPECT_EQ(SSLBlockingPage::kTypeForTesting, | 2738 EXPECT_EQ(SSLBlockingPage::kTypeForTesting, |
2730 GetInterstitialType(broken_tab_contents)); | 2739 GetInterstitialType(broken_tab_contents)); |
2731 } | 2740 } |
OLD | NEW |