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

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

Issue 8873032: Removing MessageLoop::QuitTask() from chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert 3 more problematic files Created 9 years 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 Predictor testing_master(true); 121 Predictor testing_master(true);
122 testing_master.SetHostResolver(host_resolver.get()); 122 testing_master.SetHostResolver(host_resolver.get());
123 123
124 GURL localhost("http://localhost:80"); 124 GURL localhost("http://localhost:80");
125 UrlList names; 125 UrlList names;
126 names.push_back(localhost); 126 names.push_back(localhost);
127 127
128 testing_master.ResolveList(names, UrlInfo::PAGE_SCAN_MOTIVATED); 128 testing_master.ResolveList(names, UrlInfo::PAGE_SCAN_MOTIVATED);
129 129
130 MessageLoop::current()->PostDelayedTask(FROM_HERE, 130 MessageLoop::current()->PostDelayedTask(FROM_HERE,
131 new MessageLoop::QuitTask(), 500); 131 MessageLoop::QuitClosure(), 500);
132 MessageLoop::current()->Run(); 132 MessageLoop::current()->Run();
133 133
134 EXPECT_FALSE(testing_master.WasFound(localhost)); 134 EXPECT_FALSE(testing_master.WasFound(localhost));
135 135
136 testing_master.Shutdown(); 136 testing_master.Shutdown();
137 137
138 // Clean up after ourselves. 138 // Clean up after ourselves.
139 MessageLoop::current()->RunAllPending(); 139 MessageLoop::current()->RunAllPending();
140 } 140 }
141 141
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 EXPECT_EQ(2U, referral_list.GetSize()); 589 EXPECT_EQ(2U, referral_list.GetSize());
590 590
591 predictor.DiscardAllResults(); 591 predictor.DiscardAllResults();
592 predictor.SerializeReferrers(&referral_list); 592 predictor.SerializeReferrers(&referral_list);
593 EXPECT_EQ(1U, referral_list.GetSize()); 593 EXPECT_EQ(1U, referral_list.GetSize());
594 594
595 predictor.Shutdown(); 595 predictor.Shutdown();
596 } 596 }
597 597
598 } // namespace chrome_browser_net 598 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « chrome/browser/net/gaia/token_service_unittest.cc ('k') | chrome/browser/password_manager/native_backend_gnome_x_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698