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

Unified Diff: components/payments/content/payment_response_helper_unittest.cc

Issue 2815763002: Prevent usage of web payments API over insecure HTTPS. (Closed)
Patch Set: Self-review Created 3 years, 8 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
Index: components/payments/content/payment_response_helper_unittest.cc
diff --git a/components/payments/content/payment_response_helper_unittest.cc b/components/payments/content/payment_response_helper_unittest.cc
index 7f63b6658e9bbbc0935e849badbd29ed170ed9c8..527529f4464ffb65a577538e4e17a16e1b9756f9 100644
--- a/components/payments/content/payment_response_helper_unittest.cc
+++ b/components/payments/content/payment_response_helper_unittest.cc
@@ -27,7 +27,9 @@ class FakePaymentRequestDelegate : public PaymentRequestDelegate {
public:
FakePaymentRequestDelegate(
autofill::PersonalDataManager* personal_data_manager)
- : personal_data_manager_(personal_data_manager), locale_("en-US") {}
+ : personal_data_manager_(personal_data_manager),
+ locale_("en-US"),
+ last_committed_url_("https://shop.com") {}
void ShowDialog(PaymentRequest* request) override {}
void CloseDialog() override {}
@@ -42,6 +44,12 @@ class FakePaymentRequestDelegate : public PaymentRequestDelegate {
bool IsIncognito() const override { return false; }
+ bool IsValidSslCertificate() override { return true; }
+
+ const GURL& GetLastCommittedURL() const override {
+ return last_committed_url_;
+ }
+
void DoFullCardRequest(
const autofill::CreditCard& credit_card,
base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate>
@@ -63,6 +71,7 @@ class FakePaymentRequestDelegate : public PaymentRequestDelegate {
private:
autofill::PersonalDataManager* personal_data_manager_;
std::string locale_;
+ const GURL last_committed_url_;
DISALLOW_COPY_AND_ASSIGN(FakePaymentRequestDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698