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

Unified Diff: chrome/browser/ui/views/payments/payment_request_payment_app_browsertest.cc

Issue 2815763002: Prevent usage of web payments API over insecure HTTPS. (Closed)
Patch Set: Fix typo 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: chrome/browser/ui/views/payments/payment_request_payment_app_browsertest.cc
diff --git a/chrome/browser/ui/views/payments/payment_request_payment_app_browsertest.cc b/chrome/browser/ui/views/payments/payment_request_payment_app_browsertest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7db75074e5b70efefa5d9e0ba02a73874d2d96bf
--- /dev/null
+++ b/chrome/browser/ui/views/payments/payment_request_payment_app_browsertest.cc
@@ -0,0 +1,29 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/macros.h"
+#include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h"
+#include "content/public/test/browser_test.h"
+#include "content/public/test/browser_test_utils.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace payments {
+
+class PaymentRequestPaymentAppTest : public PaymentRequestBrowserTestBase {
+ protected:
+ PaymentRequestPaymentAppTest()
+ : PaymentRequestBrowserTestBase("/payment_request_bobpay_test.html") {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PaymentRequestPaymentAppTest);
+};
+
+IN_PROC_BROWSER_TEST_F(PaymentRequestPaymentAppTest, ShowNotSupportedError) {
+ ResetEventObserver(DialogEvent::NOT_SUPPORTED_ERROR);
+ ASSERT_TRUE(content::ExecuteScript(GetActiveWebContents(), "buy();"));
+ WaitForObservedEvent();
+ ExpectBodyContains({"NotSupportedError"});
+}
+
+} // namespace payments

Powered by Google App Engine
This is Rietveld 408576698