| 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 <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "base/pickle.h" | 7 #include "base/pickle.h" |
| 8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "chrome/browser/history/history.h" | 9 #include "chrome/browser/history/history.h" |
| 10 #include "chrome/browser/history/history_backend.h" | 10 #include "chrome/browser/history/history_backend.h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 virtual void SetUp() { | 175 virtual void SetUp() { |
| 176 ChromeRenderViewHostTestHarness::SetUp(); | 176 ChromeRenderViewHostTestHarness::SetUp(); |
| 177 // The URLFetcher checks that the messageloop type is IO. | 177 // The URLFetcher checks that the messageloop type is IO. |
| 178 ASSERT_TRUE(io_thread_.StartWithOptions( | 178 ASSERT_TRUE(io_thread_.StartWithOptions( |
| 179 base::Thread::Options(MessageLoop::TYPE_IO, 0))); | 179 base::Thread::Options(MessageLoop::TYPE_IO, 0))); |
| 180 | 180 |
| 181 profile()->CreateHistoryService(true /* delete_file */, false /* no_db */); | 181 profile()->CreateHistoryService(true /* delete_file */, false /* no_db */); |
| 182 } | 182 } |
| 183 | 183 |
| 184 virtual void TearDown() { | 184 virtual void TearDown() { |
| 185 io_thread_.Stop(); | |
| 186 profile()->DestroyHistoryService(); | 185 profile()->DestroyHistoryService(); |
| 187 ChromeRenderViewHostTestHarness::TearDown(); | 186 ChromeRenderViewHostTestHarness::TearDown(); |
| 187 io_thread_.Stop(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 static bool ResourceLessThan( | 190 static bool ResourceLessThan( |
| 191 const ClientMalwareReportRequest::Resource* lhs, | 191 const ClientMalwareReportRequest::Resource* lhs, |
| 192 const ClientMalwareReportRequest::Resource* rhs) { | 192 const ClientMalwareReportRequest::Resource* rhs) { |
| 193 return lhs->id() < rhs->id(); | 193 return lhs->id() < rhs->id(); |
| 194 } | 194 } |
| 195 | 195 |
| 196 std::string WaitForSerializedReport(MalwareDetails* report) { | 196 std::string WaitForSerializedReport(MalwareDetails* report) { |
| 197 BrowserThread::PostTask( | 197 BrowserThread::PostTask( |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 pb_resource = expected.add_resources(); | 678 pb_resource = expected.add_resources(); |
| 679 pb_resource->set_id(2); | 679 pb_resource->set_id(2); |
| 680 pb_resource->set_parent_id(3); | 680 pb_resource->set_parent_id(3); |
| 681 pb_resource->set_url(kSecondRedirectURL); | 681 pb_resource->set_url(kSecondRedirectURL); |
| 682 pb_resource = expected.add_resources(); | 682 pb_resource = expected.add_resources(); |
| 683 pb_resource->set_id(3); | 683 pb_resource->set_id(3); |
| 684 pb_resource->set_url(kFirstRedirectURL); | 684 pb_resource->set_url(kFirstRedirectURL); |
| 685 | 685 |
| 686 VerifyResults(actual, expected); | 686 VerifyResults(actual, expected); |
| 687 } | 687 } |
| OLD | NEW |