Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: chrome/browser/net/predictor_unittest.cc

Issue 3115014: Revert 56384 - Don't resolve IP literals.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/base/address_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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://localhost:80"); 130 GURL localhost("http://127.0.0.1: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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 EXPECT_EQ(queue.Pop(), low2); 534 EXPECT_EQ(queue.Pop(), low2);
535 EXPECT_EQ(queue.Pop(), low3); 535 EXPECT_EQ(queue.Pop(), low3);
536 EXPECT_EQ(queue.Pop(), low4); 536 EXPECT_EQ(queue.Pop(), low4);
537 EXPECT_EQ(queue.Pop(), low5); 537 EXPECT_EQ(queue.Pop(), low5);
538 EXPECT_EQ(queue.Pop(), low4); 538 EXPECT_EQ(queue.Pop(), low4);
539 539
540 EXPECT_TRUE(queue.IsEmpty()); 540 EXPECT_TRUE(queue.IsEmpty());
541 } 541 }
542 542
543 } // namespace chrome_browser_net 543 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « no previous file | net/base/address_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698