OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h" |
| 6 #include "content/public/test/browser_test.h" |
| 7 #include "content/public/test/browser_test_utils.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 |
| 10 namespace payments { |
| 11 |
| 12 class PaymentRequestBlobUrlTest : public PaymentRequestBrowserTestBase { |
| 13 protected: |
| 14 PaymentRequestBlobUrlTest() |
| 15 : PaymentRequestBrowserTestBase("/payment_request_blob_url_test.html") {} |
| 16 }; |
| 17 |
| 18 IN_PROC_BROWSER_TEST_F(PaymentRequestBlobUrlTest, ConnectionTerminated) { |
| 19 ResetEventObserver(DialogEvent::DIALOG_CLOSED); |
| 20 ASSERT_TRUE(content::ExecuteScript( |
| 21 GetActiveWebContents(), |
| 22 "(function() { document.getElementById('buy').click(); })();")); |
| 23 WaitForObservedEvent(); |
| 24 ExpectBodyContains({"Rejected: UnknownError: Request failed"}); |
| 25 } |
| 26 |
| 27 } // namespace payments |
OLD | NEW |