| 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 #include "modules/payments/PaymentTestHelper.h" | 5 #include "modules/payments/PaymentTestHelper.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptState.h" | 7 #include "bindings/core/v8/ScriptState.h" |
| 8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
| 9 #include "modules/payments/PaymentCurrencyAmount.h" | 9 #include "modules/payments/PaymentCurrencyAmount.h" |
| 10 #include "modules/payments/PaymentMethodData.h" | 10 #include "modules/payments/PaymentMethodData.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 | 39 |
| 40 if (data == PaymentTestDataValue) { | 40 if (data == PaymentTestDataValue) { |
| 41 if (modificationType == PaymentTestOverwriteValue) | 41 if (modificationType == PaymentTestOverwriteValue) |
| 42 itemAmount.setValue(valueToUse); | 42 itemAmount.setValue(valueToUse); |
| 43 } else { | 43 } else { |
| 44 itemAmount.setValue("9.99"); | 44 itemAmount.setValue("9.99"); |
| 45 } | 45 } |
| 46 | 46 |
| 47 if (data != PaymentTestDataAmount || modificationType != PaymentTestRemoveKey) | 47 if (data != PaymentTestDataAmount || modificationType != PaymentTestRemoveKey) |
| 48 /* DO NOT SUBMIT - merge conflict marker. |
| 49 * Please spell |setAmount|, not |SetAmount| below. */ |
| 48 original.setAmount(itemAmount); | 50 original.setAmount(itemAmount); |
| 49 | 51 |
| 50 if (data == PaymentTestDataLabel) { | 52 if (data == PaymentTestDataLabel) { |
| 51 if (modificationType == PaymentTestOverwriteValue) | 53 if (modificationType == PaymentTestOverwriteValue) |
| 54 /* DO NOT SUBMIT - merge conflict marker. |
| 55 * Please spell |setLabel|, not |SetLabel| below. */ |
| 52 original.setLabel(valueToUse); | 56 original.setLabel(valueToUse); |
| 53 } else { | 57 } else { |
| 58 /* DO NOT SUBMIT - merge conflict marker. |
| 59 * Please spell |setLabel|, not |SetLabel| below. */ |
| 54 original.setLabel("Label"); | 60 original.setLabel("Label"); |
| 55 } | 61 } |
| 56 } | 62 } |
| 57 | 63 |
| 58 void buildPaymentDetailsBase(PaymentTestDetailToChange detail, | 64 void buildPaymentDetailsBase(PaymentTestDetailToChange detail, |
| 59 PaymentTestDataToChange data, | 65 PaymentTestDataToChange data, |
| 60 PaymentTestModificationType modificationType, | 66 PaymentTestModificationType modificationType, |
| 61 const String& valueToUse, | 67 const String& valueToUse, |
| 62 PaymentDetailsBase* details) { | 68 PaymentDetailsBase* details) { |
| 63 PaymentItem item; | 69 PaymentItem item; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 ON_CALL(*this, call(testing::_)) | 258 ON_CALL(*this, call(testing::_)) |
| 253 .WillByDefault( | 259 .WillByDefault( |
| 254 testing::DoAll(SaveValueIn(m_value), testing::ReturnArg<0>())); | 260 testing::DoAll(SaveValueIn(m_value), testing::ReturnArg<0>())); |
| 255 } | 261 } |
| 256 | 262 |
| 257 v8::Local<v8::Function> PaymentRequestMockFunctionScope::MockFunction::bind() { | 263 v8::Local<v8::Function> PaymentRequestMockFunctionScope::MockFunction::bind() { |
| 258 return bindToV8Function(); | 264 return bindToV8Function(); |
| 259 } | 265 } |
| 260 | 266 |
| 261 } // namespace blink | 267 } // namespace blink |
| OLD | NEW |