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

Unified Diff: content/browser/payments/payment_app_browsertest.cc

Issue 2873903003: PaymentHandler: Stop using GetAllManifests() in content side tests. (Closed)
Patch Set: PaymentHandler: Use GetAllPaymentApps() in content side. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/payments/payment_app_provider_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/payments/payment_app_browsertest.cc
diff --git a/content/browser/payments/payment_app_browsertest.cc b/content/browser/payments/payment_app_browsertest.cc
index 995ebdc7d0424ef9964dbcdb44a7fcfe59c2513e..49791c7ffb915ae38dbb3b6edc6370e0ea8a161c 100644
--- a/content/browser/payments/payment_app_browsertest.cc
+++ b/content/browser/payments/payment_app_browsertest.cc
@@ -19,10 +19,10 @@
namespace content {
namespace {
-void GetAllManifestsCallback(const base::Closure& done_callback,
- PaymentAppProvider::Manifests* out_manifests,
- PaymentAppProvider::Manifests manifests) {
- *out_manifests = std::move(manifests);
+void GetAllPaymentAppsCallback(const base::Closure& done_callback,
+ PaymentAppProvider::PaymentApps* out_apps,
+ PaymentAppProvider::PaymentApps apps) {
+ *out_apps = std::move(apps);
done_callback.Run();
}
@@ -76,16 +76,18 @@ class PaymentAppBrowserTest : public ContentBrowserTest {
std::vector<int64_t> GetAllPaymentAppIDs() {
base::RunLoop run_loop;
- PaymentAppProvider::Manifests manifests;
- PaymentAppProvider::GetInstance()->GetAllManifests(
+ PaymentAppProvider::PaymentApps apps;
+ PaymentAppProvider::GetInstance()->GetAllPaymentApps(
shell()->web_contents()->GetBrowserContext(),
- base::Bind(&GetAllManifestsCallback, run_loop.QuitClosure(),
- &manifests));
+ base::BindOnce(&GetAllPaymentAppsCallback, run_loop.QuitClosure(),
+ &apps));
run_loop.Run();
std::vector<int64_t> ids;
- for (const auto& manifest : manifests) {
- ids.push_back(manifest.first);
+ for (const auto& app_info : apps) {
+ for (const auto& instrument : app_info.second) {
+ ids.push_back(instrument->registration_id);
+ }
}
return ids;
« no previous file with comments | « no previous file | content/browser/payments/payment_app_provider_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698