OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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 "components/payments/content/payment_request_spec.h" | 5 #include "components/payments/content/payment_request_spec.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "components/payments/mojom/payment_request.mojom.h" | 10 #include "components/payments/content/payment_request.mojom.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 namespace payments { | 13 namespace payments { |
14 | 14 |
15 class PaymentRequestSpecTest : public testing::Test, | 15 class PaymentRequestSpecTest : public testing::Test, |
16 public PaymentRequestSpec::Observer { | 16 public PaymentRequestSpec::Observer { |
17 protected: | 17 protected: |
18 ~PaymentRequestSpecTest() override {} | 18 ~PaymentRequestSpecTest() override {} |
19 | 19 |
20 void OnInvalidSpecProvided() override { | 20 void OnInvalidSpecProvided() override { |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 new_option2->id = "option:2"; | 308 new_option2->id = "option:2"; |
309 new_option2->selected = true; | 309 new_option2->selected = true; |
310 new_shipping_options.push_back(std::move(new_option2)); | 310 new_shipping_options.push_back(std::move(new_option2)); |
311 mojom::PaymentDetailsPtr new_details = mojom::PaymentDetails::New(); | 311 mojom::PaymentDetailsPtr new_details = mojom::PaymentDetails::New(); |
312 new_details->shipping_options = std::move(new_shipping_options); | 312 new_details->shipping_options = std::move(new_shipping_options); |
313 | 313 |
314 spec()->UpdateWith(std::move(new_details)); | 314 spec()->UpdateWith(std::move(new_details)); |
315 } | 315 } |
316 | 316 |
317 } // namespace payments | 317 } // namespace payments |
OLD | NEW |