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

Side by Side Diff: trunk/src/chrome/browser/safe_browsing/malware_details_unittest.cc

Issue 19714004: Revert 213148 "Add asserts to TestingProfile::CreateHistoryServi..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 5 months 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) 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
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 ASSERT_TRUE(profile()->CreateHistoryService( 191 profile()->CreateHistoryService(true /* delete_file */, false /* no_db */);
192 true /* delete_file */, false /* no_db */));
193 } 192 }
194 193
195 virtual void TearDown() OVERRIDE { 194 virtual void TearDown() OVERRIDE {
196 profile()->DestroyHistoryService(); 195 profile()->DestroyHistoryService();
197 ChromeRenderViewHostTestHarness::TearDown(); 196 ChromeRenderViewHostTestHarness::TearDown();
198 } 197 }
199 198
200 static bool ResourceLessThan( 199 static bool ResourceLessThan(
201 const ClientMalwareReportRequest::Resource* lhs, 200 const ClientMalwareReportRequest::Resource* lhs,
202 const ClientMalwareReportRequest::Resource* rhs) { 201 const ClientMalwareReportRequest::Resource* rhs) {
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 pb_resource = expected.add_resources(); 687 pb_resource = expected.add_resources();
689 pb_resource->set_id(2); 688 pb_resource->set_id(2);
690 pb_resource->set_parent_id(3); 689 pb_resource->set_parent_id(3);
691 pb_resource->set_url(kSecondRedirectURL); 690 pb_resource->set_url(kSecondRedirectURL);
692 pb_resource = expected.add_resources(); 691 pb_resource = expected.add_resources();
693 pb_resource->set_id(3); 692 pb_resource->set_id(3);
694 pb_resource->set_url(kFirstRedirectURL); 693 pb_resource->set_url(kFirstRedirectURL);
695 694
696 VerifyResults(actual, expected); 695 VerifyResults(actual, expected);
697 } 696 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698