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

Side by Side Diff: content/browser/payments/payment_app_context_impl_unittest.cc

Issue 2586203003: PaymentApp: Remove scope_url parameter from Get/SetManifest methods. (Closed)
Patch Set: Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <cstddef> 5 #include <cstddef>
6 #include <string> 6 #include <string>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 payments::mojom::PaymentAppManifestPtr manifest = 61 payments::mojom::PaymentAppManifestPtr manifest =
62 payments::mojom::PaymentAppManifest::New(); 62 payments::mojom::PaymentAppManifest::New();
63 manifest->icon = std::string("payment-app-icon"); 63 manifest->icon = std::string("payment-app-icon");
64 manifest->name = scope_url.spec(); 64 manifest->name = scope_url.spec();
65 manifest->options.push_back(std::move(option)); 65 manifest->options.push_back(std::move(option));
66 66
67 payments::mojom::PaymentAppManifestError error = payments::mojom:: 67 payments::mojom::PaymentAppManifestError error = payments::mojom::
68 PaymentAppManifestError::MANIFEST_STORAGE_OPERATION_FAILED; 68 PaymentAppManifestError::MANIFEST_STORAGE_OPERATION_FAILED;
69 bool called = false; 69 bool called = false;
70 SetManifest(manager, scope_url.spec(), std::move(manifest), 70 SetManifest(manager, std::move(manifest),
71 base::Bind(&SetManifestCallback, &called, &error)); 71 base::Bind(&SetManifestCallback, &called, &error));
72 ASSERT_TRUE(called); 72 ASSERT_TRUE(called);
73 73
74 ASSERT_EQ(payments::mojom::PaymentAppManifestError::NONE, error); 74 ASSERT_EQ(payments::mojom::PaymentAppManifestError::NONE, error);
75 } 75 }
76 76
77 private: 77 private:
78 DISALLOW_COPY_AND_ASSIGN(PaymentAppContextTest); 78 DISALLOW_COPY_AND_ASSIGN(PaymentAppContextTest);
79 }; 79 };
80 80
(...skipping 24 matching lines...) Expand all
105 ASSERT_EQ(1U, manifest.second->options.size()); 105 ASSERT_EQ(1U, manifest.second->options.size());
106 EXPECT_EQ("payment-app-icon", manifest.second->options[0]->icon.value()); 106 EXPECT_EQ("payment-app-icon", manifest.second->options[0]->icon.value());
107 EXPECT_EQ("Visa ****", manifest.second->options[0]->name); 107 EXPECT_EQ("Visa ****", manifest.second->options[0]->name);
108 EXPECT_EQ("payment-app-id", manifest.second->options[0]->id); 108 EXPECT_EQ("payment-app-id", manifest.second->options[0]->id);
109 ASSERT_EQ(1U, manifest.second->options[0]->enabled_methods.size()); 109 ASSERT_EQ(1U, manifest.second->options[0]->enabled_methods.size());
110 EXPECT_EQ("visa", manifest.second->options[0]->enabled_methods[0]); 110 EXPECT_EQ("visa", manifest.second->options[0]->enabled_methods[0]);
111 } 111 }
112 } 112 }
113 113
114 } // namespace content 114 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698