| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <time.h> | 5 #include <time.h> |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 TEST_F(PredictorTest, ShutdownWhenResolutionIsPendingTest) { | 120 TEST_F(PredictorTest, ShutdownWhenResolutionIsPendingTest) { |
| 121 scoped_refptr<net::WaitingHostResolverProc> resolver_proc = | 121 scoped_refptr<net::WaitingHostResolverProc> resolver_proc = |
| 122 new net::WaitingHostResolverProc(NULL); | 122 new net::WaitingHostResolverProc(NULL); |
| 123 host_resolver_->Reset(resolver_proc); | 123 host_resolver_->Reset(resolver_proc); |
| 124 | 124 |
| 125 scoped_refptr<Predictor> testing_master = new Predictor(host_resolver_, | 125 scoped_refptr<Predictor> testing_master = new Predictor(host_resolver_, |
| 126 default_max_queueing_delay_, | 126 default_max_queueing_delay_, |
| 127 PredictorInit::kMaxPrefetchConcurrentLookups, | 127 PredictorInit::kMaxPrefetchConcurrentLookups, |
| 128 false); | 128 false); |
| 129 | 129 |
| 130 GURL localhost("http://127.0.0.1:80"); | 130 GURL localhost("http://localhost:80"); |
| 131 UrlList names; | 131 UrlList names; |
| 132 names.push_back(localhost); | 132 names.push_back(localhost); |
| 133 | 133 |
| 134 testing_master->ResolveList(names, UrlInfo::PAGE_SCAN_MOTIVATED); | 134 testing_master->ResolveList(names, UrlInfo::PAGE_SCAN_MOTIVATED); |
| 135 | 135 |
| 136 MessageLoop::current()->PostDelayedTask(FROM_HERE, | 136 MessageLoop::current()->PostDelayedTask(FROM_HERE, |
| 137 new MessageLoop::QuitTask(), 500); | 137 new MessageLoop::QuitTask(), 500); |
| 138 MessageLoop::current()->Run(); | 138 MessageLoop::current()->Run(); |
| 139 | 139 |
| 140 EXPECT_FALSE(testing_master->WasFound(localhost)); | 140 EXPECT_FALSE(testing_master->WasFound(localhost)); |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 EXPECT_NE(Predictor::CanonicalizeUrl(http), | 573 EXPECT_NE(Predictor::CanonicalizeUrl(http), |
| 574 Predictor::CanonicalizeUrl(https)); | 574 Predictor::CanonicalizeUrl(https)); |
| 575 | 575 |
| 576 // Https works fine. | 576 // Https works fine. |
| 577 GURL long_https("https://host:999/path?query=value"); | 577 GURL long_https("https://host:999/path?query=value"); |
| 578 EXPECT_EQ(Predictor::CanonicalizeUrl(long_https), | 578 EXPECT_EQ(Predictor::CanonicalizeUrl(long_https), |
| 579 long_https.GetWithEmptyPath()); | 579 long_https.GetWithEmptyPath()); |
| 580 } | 580 } |
| 581 | 581 |
| 582 } // namespace chrome_browser_net | 582 } // namespace chrome_browser_net |
| OLD | NEW |