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

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

Issue 1749603002: Store URLs in WebappDataStorage, and purge them when history is cleared. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/browsing_data/browsing_data_remover.h" 5 #include "chrome/browser/browsing_data/browsing_data_remover.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 #if BUILDFLAG(ANDROID_JAVA_UI) 267 #if BUILDFLAG(ANDROID_JAVA_UI)
268 class TestWebappRegistry : public WebappRegistry { 268 class TestWebappRegistry : public WebappRegistry {
269 public: 269 public:
270 TestWebappRegistry() : WebappRegistry() { } 270 TestWebappRegistry() : WebappRegistry() { }
271 271
272 void UnregisterWebapps(const base::Closure& callback) override { 272 void UnregisterWebapps(const base::Closure& callback) override {
273 // Mocks out a JNI call and runs the callback as a delayed task. 273 // Mocks out a JNI call and runs the callback as a delayed task.
274 BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE, callback, 274 BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE, callback,
275 base::TimeDelta::FromMilliseconds(10)); 275 base::TimeDelta::FromMilliseconds(10));
276 } 276 }
277
278 void ClearWebappHistory(const base::Closure& callback) override {
279 // Mocks out a JNI call and runs the callback as a delayed task.
280 BrowserThread::PostDelayedTask(BrowserThread::UI, FROM_HERE, callback,
281 base::TimeDelta::FromMilliseconds(10));
282 }
277 }; 283 };
278 #endif 284 #endif
279 285
280 // Custom matcher to test the equivalence of two URL filters. Since those are 286 // Custom matcher to test the equivalence of two URL filters. Since those are
281 // blackbox predicates, we can only approximate the equivalence by testing 287 // blackbox predicates, we can only approximate the equivalence by testing
282 // whether the filter give the same answer for several URLs. This is currently 288 // whether the filter give the same answer for several URLs. This is currently
283 // good enough for our testing purposes, to distinguish whitelists 289 // good enough for our testing purposes, to distinguish whitelists
284 // and blacklists, empty and non-empty filters and such. 290 // and blacklists, empty and non-empty filters and such.
285 // TODO(msramek): BrowsingDataRemover and some of its backends support URL 291 // TODO(msramek): BrowsingDataRemover and some of its backends support URL
286 // filters, but its constructor currently only takes a single URL and constructs 292 // filters, but its constructor currently only takes a single URL and constructs
(...skipping 2013 matching lines...) Expand 10 before | Expand all | Expand 10 after
2300 EXPECT_CALL(*tester.store(), RemoveLoginsByURLAndTimeImpl(_, _, _)) 2306 EXPECT_CALL(*tester.store(), RemoveLoginsByURLAndTimeImpl(_, _, _))
2301 .WillOnce(Return(password_manager::PasswordStoreChangeList())); 2307 .WillOnce(Return(password_manager::PasswordStoreChangeList()));
2302 EXPECT_CALL(*tester.store(), DisableAutoSignInForAllLoginsImpl()) 2308 EXPECT_CALL(*tester.store(), DisableAutoSignInForAllLoginsImpl())
2303 .WillOnce(Return(password_manager::PasswordStoreChangeList())); 2309 .WillOnce(Return(password_manager::PasswordStoreChangeList()));
2304 2310
2305 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, 2311 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING,
2306 BrowsingDataRemover::REMOVE_COOKIES | 2312 BrowsingDataRemover::REMOVE_COOKIES |
2307 BrowsingDataRemover::REMOVE_PASSWORDS, 2313 BrowsingDataRemover::REMOVE_PASSWORDS,
2308 false); 2314 false);
2309 } 2315 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698