| 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 <iostream> |    5 #include <iostream> | 
|    6 #include "base/memory/ref_counted.h" |    6 #include "base/memory/ref_counted.h" | 
|    7 #include "base/memory/scoped_ptr.h" |    7 #include "base/memory/scoped_ptr.h" | 
|    8 #include "base/message_loop.h" |    8 #include "base/message_loop.h" | 
|    9 #include "base/run_loop.h" |    9 #include "base/run_loop.h" | 
|   10 #include "base/time.h" |   10 #include "base/time.h" | 
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  167   PrefetchDataMap test_host_data_; |  167   PrefetchDataMap test_host_data_; | 
|  168   PrefetchData empty_url_data_; |  168   PrefetchData empty_url_data_; | 
|  169   PrefetchData empty_host_data_; |  169   PrefetchData empty_host_data_; | 
|  170 }; |  170 }; | 
|  171  |  171  | 
|  172 ResourcePrefetchPredictorTest::ResourcePrefetchPredictorTest() |  172 ResourcePrefetchPredictorTest::ResourcePrefetchPredictorTest() | 
|  173     : loop_(base::MessageLoop::TYPE_DEFAULT), |  173     : loop_(base::MessageLoop::TYPE_DEFAULT), | 
|  174       ui_thread_(content::BrowserThread::UI, &loop_), |  174       ui_thread_(content::BrowserThread::UI, &loop_), | 
|  175       db_thread_(content::BrowserThread::DB, &loop_), |  175       db_thread_(content::BrowserThread::DB, &loop_), | 
|  176       profile_(new TestingProfile()), |  176       profile_(new TestingProfile()), | 
|  177       predictor_(NULL), |  | 
|  178       mock_tables_(new StrictMock<MockResourcePrefetchPredictorTables>()), |  177       mock_tables_(new StrictMock<MockResourcePrefetchPredictorTables>()), | 
|  179       empty_url_data_(PREFETCH_KEY_TYPE_URL, std::string()), |  178       empty_url_data_(PREFETCH_KEY_TYPE_URL, std::string()), | 
|  180       empty_host_data_(PREFETCH_KEY_TYPE_HOST, std::string()) {} |  179       empty_host_data_(PREFETCH_KEY_TYPE_HOST, std::string()) {} | 
|  181  |  180  | 
|  182 ResourcePrefetchPredictorTest::~ResourcePrefetchPredictorTest() { |  181 ResourcePrefetchPredictorTest::~ResourcePrefetchPredictorTest() { | 
|  183   profile_.reset(NULL); |  182   profile_.reset(NULL); | 
|  184   loop_.RunUntilIdle(); |  183   loop_.RunUntilIdle(); | 
|  185 } |  184 } | 
|  186  |  185  | 
|  187 void ResourcePrefetchPredictorTest::SetUp() { |  186 void ResourcePrefetchPredictorTest::SetUp() { | 
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  918       predictor_->inflight_navigations_[main_frame1.navigation_id]->at(0))); |  917       predictor_->inflight_navigations_[main_frame1.navigation_id]->at(0))); | 
|  919   EXPECT_TRUE(URLRequestSummaryAreEqual( |  918   EXPECT_TRUE(URLRequestSummaryAreEqual( | 
|  920       resource2, |  919       resource2, | 
|  921       predictor_->inflight_navigations_[main_frame1.navigation_id]->at(1))); |  920       predictor_->inflight_navigations_[main_frame1.navigation_id]->at(1))); | 
|  922   EXPECT_TRUE(URLRequestSummaryAreEqual( |  921   EXPECT_TRUE(URLRequestSummaryAreEqual( | 
|  923       resource3, |  922       resource3, | 
|  924       predictor_->inflight_navigations_[main_frame1.navigation_id]->at(2))); |  923       predictor_->inflight_navigations_[main_frame1.navigation_id]->at(2))); | 
|  925 } |  924 } | 
|  926  |  925  | 
|  927 }  // namespace predictors |  926 }  // namespace predictors | 
| OLD | NEW |