| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |