| 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 <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/pickle.h" | 8 #include "base/pickle.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 class MalwareDetailsTest : public ChromeRenderViewHostTestHarness { | 181 class MalwareDetailsTest : public ChromeRenderViewHostTestHarness { |
| 182 public: | 182 public: |
| 183 typedef SafeBrowsingUIManager::UnsafeResource UnsafeResource; | 183 typedef SafeBrowsingUIManager::UnsafeResource UnsafeResource; |
| 184 | 184 |
| 185 MalwareDetailsTest() | 185 MalwareDetailsTest() |
| 186 : ui_manager_(new MockSafeBrowsingUIManager()) { | 186 : ui_manager_(new MockSafeBrowsingUIManager()) { |
| 187 } | 187 } |
| 188 | 188 |
| 189 virtual void SetUp() OVERRIDE { | 189 virtual void SetUp() OVERRIDE { |
| 190 ChromeRenderViewHostTestHarness::SetUp(); | 190 ChromeRenderViewHostTestHarness::SetUp(); |
| 191 profile()->CreateHistoryService(true /* delete_file */, false /* no_db */); | 191 ASSERT_TRUE(profile()->CreateHistoryService( |
| 192 true /* delete_file */, false /* no_db */)); |
| 192 } | 193 } |
| 193 | 194 |
| 194 virtual void TearDown() OVERRIDE { | 195 virtual void TearDown() OVERRIDE { |
| 195 profile()->DestroyHistoryService(); | 196 profile()->DestroyHistoryService(); |
| 196 ChromeRenderViewHostTestHarness::TearDown(); | 197 ChromeRenderViewHostTestHarness::TearDown(); |
| 197 } | 198 } |
| 198 | 199 |
| 199 static bool ResourceLessThan( | 200 static bool ResourceLessThan( |
| 200 const ClientMalwareReportRequest::Resource* lhs, | 201 const ClientMalwareReportRequest::Resource* lhs, |
| 201 const ClientMalwareReportRequest::Resource* rhs) { | 202 const ClientMalwareReportRequest::Resource* rhs) { |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 pb_resource = expected.add_resources(); | 688 pb_resource = expected.add_resources(); |
| 688 pb_resource->set_id(2); | 689 pb_resource->set_id(2); |
| 689 pb_resource->set_parent_id(3); | 690 pb_resource->set_parent_id(3); |
| 690 pb_resource->set_url(kSecondRedirectURL); | 691 pb_resource->set_url(kSecondRedirectURL); |
| 691 pb_resource = expected.add_resources(); | 692 pb_resource = expected.add_resources(); |
| 692 pb_resource->set_id(3); | 693 pb_resource->set_id(3); |
| 693 pb_resource->set_url(kFirstRedirectURL); | 694 pb_resource->set_url(kFirstRedirectURL); |
| 694 | 695 |
| 695 VerifyResults(actual, expected); | 696 VerifyResults(actual, expected); |
| 696 } | 697 } |
| OLD | NEW |