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 <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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 for (auto* interceptor : interceptors_) | 475 for (auto* interceptor : interceptors_) |
476 interceptor->SetBehindCaptivePortal(behind_captive_portal); | 476 interceptor->SetBehindCaptivePortal(behind_captive_portal); |
477 } | 477 } |
478 | 478 |
479 net::URLRequestJob* | 479 net::URLRequestJob* |
480 URLRequestMockCaptivePortalJobFactory::Interceptor::MaybeInterceptRequest( | 480 URLRequestMockCaptivePortalJobFactory::Interceptor::MaybeInterceptRequest( |
481 net::URLRequest* request, | 481 net::URLRequest* request, |
482 net::NetworkDelegate* network_delegate) const { | 482 net::NetworkDelegate* network_delegate) const { |
483 EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 483 EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
484 | 484 |
485 const base::TaskTraits kTraits = base::TaskTraits().MayBlock(); | 485 const base::TaskTraits kTraits = {base::MayBlock()}; |
486 | 486 |
487 // The PathService is threadsafe. | 487 // The PathService is threadsafe. |
488 base::FilePath root_http; | 488 base::FilePath root_http; |
489 PathService::Get(chrome::DIR_TEST_DATA, &root_http); | 489 PathService::Get(chrome::DIR_TEST_DATA, &root_http); |
490 | 490 |
491 if (request->url() == kMockHttpsUrl || | 491 if (request->url() == kMockHttpsUrl || |
492 request->url() == kMockHttpsUrl2) { | 492 request->url() == kMockHttpsUrl2) { |
493 if (behind_captive_portal_) | 493 if (behind_captive_portal_) |
494 return new URLRequestTimeoutOnDemandJob(request, network_delegate); | 494 return new URLRequestTimeoutOnDemandJob(request, network_delegate); |
495 // Once logged in to the portal, HTTPS requests return the page that was | 495 // Once logged in to the portal, HTTPS requests return the page that was |
(...skipping 2339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2835 | 2835 |
2836 EXPECT_EQ(CaptivePortalTabReloader::STATE_NEEDS_RELOAD, | 2836 EXPECT_EQ(CaptivePortalTabReloader::STATE_NEEDS_RELOAD, |
2837 GetStateOfTabReloaderAt(browser(), broken_tab_index)); | 2837 GetStateOfTabReloaderAt(browser(), broken_tab_index)); |
2838 | 2838 |
2839 WaitForInterstitialAttach(broken_tab_contents); | 2839 WaitForInterstitialAttach(broken_tab_contents); |
2840 portal_observer.WaitForResults(1); | 2840 portal_observer.WaitForResults(1); |
2841 | 2841 |
2842 EXPECT_EQ(SSLBlockingPage::kTypeForTesting, | 2842 EXPECT_EQ(SSLBlockingPage::kTypeForTesting, |
2843 GetInterstitialType(broken_tab_contents)); | 2843 GetInterstitialType(broken_tab_contents)); |
2844 } | 2844 } |
OLD | NEW |