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 "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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 | 266 |
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. | 273 // Mocks out a JNI call and runs the callback. |
274 callback.Run(); | 274 callback.Run(); |
275 } | 275 } |
| 276 |
| 277 void ClearWebappHistory(const base::Closure& callback) override { |
| 278 // Mocks out a JNI call and calls the callback. |
| 279 callback.Run(); |
| 280 } |
276 }; | 281 }; |
277 #endif | 282 #endif |
278 | 283 |
279 // Custom matcher to test the equivalence of two URL filters. Since those are | 284 // Custom matcher to test the equivalence of two URL filters. Since those are |
280 // blackbox predicates, we can only approximate the equivalence by testing | 285 // blackbox predicates, we can only approximate the equivalence by testing |
281 // whether the filter give the same answer for several URLs. This is currently | 286 // whether the filter give the same answer for several URLs. This is currently |
282 // good enough for our testing purposes, to distinguish whitelists | 287 // good enough for our testing purposes, to distinguish whitelists |
283 // and blacklists, empty and non-empty filters and such. | 288 // and blacklists, empty and non-empty filters and such. |
284 // TODO(msramek): BrowsingDataRemover and some of its backends support URL | 289 // TODO(msramek): BrowsingDataRemover and some of its backends support URL |
285 // filters, but its constructor currently only takes a single URL and constructs | 290 // filters, but its constructor currently only takes a single URL and constructs |
(...skipping 2013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2299 EXPECT_CALL(*tester.store(), RemoveLoginsByURLAndTimeImpl(_, _, _)) | 2304 EXPECT_CALL(*tester.store(), RemoveLoginsByURLAndTimeImpl(_, _, _)) |
2300 .WillOnce(Return(password_manager::PasswordStoreChangeList())); | 2305 .WillOnce(Return(password_manager::PasswordStoreChangeList())); |
2301 EXPECT_CALL(*tester.store(), DisableAutoSignInForAllLoginsImpl()) | 2306 EXPECT_CALL(*tester.store(), DisableAutoSignInForAllLoginsImpl()) |
2302 .WillOnce(Return(password_manager::PasswordStoreChangeList())); | 2307 .WillOnce(Return(password_manager::PasswordStoreChangeList())); |
2303 | 2308 |
2304 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, | 2309 BlockUntilBrowsingDataRemoved(BrowsingDataRemover::EVERYTHING, |
2305 BrowsingDataRemover::REMOVE_COOKIES | | 2310 BrowsingDataRemover::REMOVE_COOKIES | |
2306 BrowsingDataRemover::REMOVE_PASSWORDS, | 2311 BrowsingDataRemover::REMOVE_PASSWORDS, |
2307 false); | 2312 false); |
2308 } | 2313 } |
OLD | NEW |