| 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 | 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "net/base/transport_security_state.h" | 48 #include "net/base/transport_security_state.h" |
| 49 #include "net/url_request/url_request.h" | 49 #include "net/url_request/url_request.h" |
| 50 #include "net/url_request/url_request_context.h" | 50 #include "net/url_request/url_request_context.h" |
| 51 #include "net/url_request/url_request_context_getter.h" | 51 #include "net/url_request/url_request_context_getter.h" |
| 52 #include "net/url_request/url_request_filter.h" | 52 #include "net/url_request/url_request_filter.h" |
| 53 #include "net/url_request/url_request_job.h" | 53 #include "net/url_request/url_request_job.h" |
| 54 #include "net/url_request/url_request_status.h" | 54 #include "net/url_request/url_request_status.h" |
| 55 #include "testing/gtest/include/gtest/gtest.h" | 55 #include "testing/gtest/include/gtest/gtest.h" |
| 56 | 56 |
| 57 using content::BrowserThread; | 57 using content::BrowserThread; |
| 58 using content::URLRequestFailedJob; |
| 59 using content::URLRequestMockHTTPJob; |
| 58 | 60 |
| 59 namespace captive_portal { | 61 namespace captive_portal { |
| 60 | 62 |
| 61 namespace { | 63 namespace { |
| 62 | 64 |
| 63 // Path of the fake login page, when using the TestServer. | 65 // Path of the fake login page, when using the TestServer. |
| 64 const char* const kTestServerLoginPath = "files/captive_portal/login.html"; | 66 const char* const kTestServerLoginPath = "files/captive_portal/login.html"; |
| 65 | 67 |
| 66 // Path of a page with an iframe that has a mock SSL timeout, when using the | 68 // Path of a page with an iframe that has a mock SSL timeout, when using the |
| 67 // TestServer. | 69 // TestServer. |
| (...skipping 2114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2182 base::Bind(&AddHstsHost, | 2184 base::Bind(&AddHstsHost, |
| 2183 make_scoped_refptr(browser()->profile()->GetRequestContext()), | 2185 make_scoped_refptr(browser()->profile()->GetRequestContext()), |
| 2184 http_timeout_url.host())); | 2186 http_timeout_url.host())); |
| 2185 | 2187 |
| 2186 SlowLoadBehindCaptivePortal(browser(), true, http_timeout_url, 1, 1); | 2188 SlowLoadBehindCaptivePortal(browser(), true, http_timeout_url, 1, 1); |
| 2187 Login(browser(), 1, 0); | 2189 Login(browser(), 1, 0); |
| 2188 FailLoadsAfterLogin(browser(), 1); | 2190 FailLoadsAfterLogin(browser(), 1); |
| 2189 } | 2191 } |
| 2190 | 2192 |
| 2191 } // namespace captive_portal | 2193 } // namespace captive_portal |
| OLD | NEW |