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

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

Issue 19616004: Add asserts to TestingProfile::CreateHistoryService to ensure files are deleted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix release unit tests 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
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 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 pb_resource = expected.add_resources(); 685 pb_resource = expected.add_resources();
685 pb_resource->set_id(2); 686 pb_resource->set_id(2);
686 pb_resource->set_parent_id(3); 687 pb_resource->set_parent_id(3);
687 pb_resource->set_url(kSecondRedirectURL); 688 pb_resource->set_url(kSecondRedirectURL);
688 pb_resource = expected.add_resources(); 689 pb_resource = expected.add_resources();
689 pb_resource->set_id(3); 690 pb_resource->set_id(3);
690 pb_resource->set_url(kFirstRedirectURL); 691 pb_resource->set_url(kFirstRedirectURL);
691 692
692 VerifyResults(actual, expected); 693 VerifyResults(actual, expected);
693 } 694 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698