OLD | NEW |
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 #ifndef PaymentTestHelper_h | 5 #ifndef PaymentTestHelper_h |
6 #define PaymentTestHelper_h | 6 #define PaymentTestHelper_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptFunction.h" | 8 #include "bindings/core/v8/ScriptFunction.h" |
9 #include "bindings/core/v8/V8DOMException.h" | 9 #include "bindings/core/v8/V8DOMException.h" |
10 #include "components/payments/content/payment_request.mojom-blink.h" | 10 #include "components/payments/content/payment_request.mojom-blink.h" |
11 #include "modules/payments/PaymentDetails.h" | 11 #include "modules/payments/PaymentDetailsInit.h" |
| 12 #include "modules/payments/PaymentDetailsUpdate.h" |
12 #include "modules/payments/PaymentItem.h" | 13 #include "modules/payments/PaymentItem.h" |
13 #include "modules/payments/PaymentShippingOption.h" | 14 #include "modules/payments/PaymentShippingOption.h" |
14 #include "platform/heap/HeapAllocator.h" | 15 #include "platform/heap/HeapAllocator.h" |
15 #include "platform/heap/Persistent.h" | 16 #include "platform/heap/Persistent.h" |
16 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
17 #include "wtf/Allocator.h" | 18 #include "wtf/Allocator.h" |
18 #include "wtf/Vector.h" | 19 #include "wtf/Vector.h" |
19 #include "wtf/text/WTFString.h" | 20 #include "wtf/text/WTFString.h" |
20 | 21 |
21 namespace blink { | 22 namespace blink { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 PaymentTestDataToChange = PaymentTestDataNone, | 60 PaymentTestDataToChange = PaymentTestDataNone, |
60 PaymentTestModificationType = PaymentTestOverwriteValue, | 61 PaymentTestModificationType = PaymentTestOverwriteValue, |
61 const String& valueToUse = String()); | 62 const String& valueToUse = String()); |
62 | 63 |
63 PaymentDetailsModifier buildPaymentDetailsModifierForTest( | 64 PaymentDetailsModifier buildPaymentDetailsModifierForTest( |
64 PaymentTestDetailToChange = PaymentTestDetailNone, | 65 PaymentTestDetailToChange = PaymentTestDetailNone, |
65 PaymentTestDataToChange = PaymentTestDataNone, | 66 PaymentTestDataToChange = PaymentTestDataNone, |
66 PaymentTestModificationType = PaymentTestOverwriteValue, | 67 PaymentTestModificationType = PaymentTestOverwriteValue, |
67 const String& valueToUse = String()); | 68 const String& valueToUse = String()); |
68 | 69 |
69 PaymentDetails buildPaymentDetailsForTest( | 70 PaymentDetailsInit buildPaymentDetailsInitForTest( |
70 PaymentTestDetailToChange = PaymentTestDetailNone, | 71 PaymentTestDetailToChange = PaymentTestDetailNone, |
71 PaymentTestDataToChange = PaymentTestDataNone, | 72 PaymentTestDataToChange = PaymentTestDataNone, |
72 PaymentTestModificationType = PaymentTestOverwriteValue, | 73 PaymentTestModificationType = PaymentTestOverwriteValue, |
73 const String& valueToUse = String()); | 74 const String& valueToUse = String()); |
74 | 75 |
75 PaymentDetails buildPaymentDetailsErrorMsgForTest( | 76 PaymentDetailsUpdate buildPaymentDetailsUpdateForTest( |
| 77 PaymentTestDetailToChange = PaymentTestDetailNone, |
| 78 PaymentTestDataToChange = PaymentTestDataNone, |
| 79 PaymentTestModificationType = PaymentTestOverwriteValue, |
| 80 const String& valueToUse = String()); |
| 81 |
| 82 PaymentDetailsUpdate buildPaymentDetailsErrorMsgForTest( |
76 const String& valueToUse = String()); | 83 const String& valueToUse = String()); |
77 | 84 |
78 HeapVector<PaymentMethodData> buildPaymentMethodDataForTest(); | 85 HeapVector<PaymentMethodData> buildPaymentMethodDataForTest(); |
79 | 86 |
80 payments::mojom::blink::PaymentResponsePtr buildPaymentResponseForTest(); | 87 payments::mojom::blink::PaymentResponsePtr buildPaymentResponseForTest(); |
81 | 88 |
82 void makePaymentRequestOriginSecure(Document&); | 89 void makePaymentRequestOriginSecure(Document&); |
83 | 90 |
84 class PaymentRequestMockFunctionScope { | 91 class PaymentRequestMockFunctionScope { |
85 STACK_ALLOCATED(); | 92 STACK_ALLOCATED(); |
(...skipping 16 matching lines...) Expand all Loading... |
102 String* m_value; | 109 String* m_value; |
103 }; | 110 }; |
104 | 111 |
105 ScriptState* m_scriptState; | 112 ScriptState* m_scriptState; |
106 Vector<Persistent<MockFunction>> m_mockFunctions; | 113 Vector<Persistent<MockFunction>> m_mockFunctions; |
107 }; | 114 }; |
108 | 115 |
109 } // namespace blink | 116 } // namespace blink |
110 | 117 |
111 #endif // PaymentTestHelper_h | 118 #endif // PaymentTestHelper_h |
OLD | NEW |