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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_local_storage_helper_browsertest.cc

Issue 459233002: Browsing Data Deletion: Style fixes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-apply comment tweaks Created 6 years, 4 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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 public: 75 public:
76 explicit StopTestOnCallback( 76 explicit StopTestOnCallback(
77 BrowsingDataLocalStorageHelper* local_storage_helper) 77 BrowsingDataLocalStorageHelper* local_storage_helper)
78 : local_storage_helper_(local_storage_helper) { 78 : local_storage_helper_(local_storage_helper) {
79 DCHECK(local_storage_helper_); 79 DCHECK(local_storage_helper_);
80 } 80 }
81 81
82 void Callback( 82 void Callback(
83 const std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>& 83 const std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>&
84 local_storage_info) { 84 local_storage_info) {
85 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 85 DCHECK_CURRENTLY_ON(BrowserThread::UI);
86 // There's no guarantee on the order, ensure these files are there. 86 // There's no guarantee on the order, ensure these files are there.
87 const char* const kTestHosts[] = {"www.chromium.org", "www.google.com"}; 87 const char* const kTestHosts[] = {"www.chromium.org", "www.google.com"};
88 bool test_hosts_found[arraysize(kTestHosts)] = {false, false}; 88 bool test_hosts_found[arraysize(kTestHosts)] = {false, false};
89 ASSERT_EQ(arraysize(kTestHosts), local_storage_info.size()); 89 ASSERT_EQ(arraysize(kTestHosts), local_storage_info.size());
90 typedef std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo> 90 typedef std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo>
91 LocalStorageInfoList; 91 LocalStorageInfoList;
92 for (size_t i = 0; i < arraysize(kTestHosts); ++i) { 92 for (size_t i = 0; i < arraysize(kTestHosts); ++i) {
93 for (LocalStorageInfoList::const_iterator info = 93 for (LocalStorageInfoList::const_iterator info =
94 local_storage_info.begin(); info != local_storage_info.end(); 94 local_storage_info.begin(); info != local_storage_info.end();
95 ++info) { 95 ++info) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 base::Bind(&TestCompletionCallback::callback, 182 base::Bind(&TestCompletionCallback::callback,
183 base::Unretained(&callback))); 183 base::Unretained(&callback)));
184 184
185 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo> result = 185 std::list<BrowsingDataLocalStorageHelper::LocalStorageInfo> result =
186 callback.result(); 186 callback.result();
187 187
188 ASSERT_EQ(1u, result.size()); 188 ASSERT_EQ(1u, result.size());
189 EXPECT_EQ(origin, result.begin()->origin_url); 189 EXPECT_EQ(origin, result.begin()->origin_url);
190 } 190 }
191 } // namespace 191 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698