| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/json/json_reader.h" | 5 #include "base/json/json_reader.h" |
| 6 #include "base/json/json_writer.h" | 6 #include "base/json/json_writer.h" |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1000 AutofillMetrics::WALLET_UNKNOWN_ERROR | 1000 AutofillMetrics::WALLET_UNKNOWN_ERROR |
| 1001 }, | 1001 }, |
| 1002 { | 1002 { |
| 1003 "random_string_2", | 1003 "random_string_2", |
| 1004 "", | 1004 "", |
| 1005 WalletClient::UNKNOWN_ERROR, | 1005 WalletClient::UNKNOWN_ERROR, |
| 1006 AutofillMetrics::WALLET_UNKNOWN_ERROR | 1006 AutofillMetrics::WALLET_UNKNOWN_ERROR |
| 1007 }, | 1007 }, |
| 1008 }; | 1008 }; |
| 1009 | 1009 |
| 1010 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) { | 1010 for (size_t i = 0; i < arraysize(test_cases); ++i) { |
| 1011 SCOPED_TRACE( | 1011 SCOPED_TRACE( |
| 1012 base::StringPrintf( | 1012 base::StringPrintf( |
| 1013 "%s - %s", | 1013 "%s - %s", |
| 1014 test_cases[i].error_type_string.c_str(), | 1014 test_cases[i].error_type_string.c_str(), |
| 1015 test_cases[i].message_type_for_buyer_string.c_str())); | 1015 test_cases[i].message_type_for_buyer_string.c_str())); |
| 1016 TestWalletErrorCode(test_cases[i].error_type_string, | 1016 TestWalletErrorCode(test_cases[i].error_type_string, |
| 1017 test_cases[i].message_type_for_buyer_string, | 1017 test_cases[i].message_type_for_buyer_string, |
| 1018 test_cases[i].expected_error_type, | 1018 test_cases[i].expected_error_type, |
| 1019 test_cases[i].expected_autofill_metric); | 1019 test_cases[i].expected_autofill_metric); |
| 1020 } | 1020 } |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1862 delegate_.ExpectBaselineMetrics(); | 1862 delegate_.ExpectBaselineMetrics(); |
| 1863 | 1863 |
| 1864 wallet_client_->GetWalletItems(base::string16(), base::string16()); | 1864 wallet_client_->GetWalletItems(base::string16(), base::string16()); |
| 1865 EXPECT_TRUE(wallet_client_->HasRequestInProgress()); | 1865 EXPECT_TRUE(wallet_client_->HasRequestInProgress()); |
| 1866 wallet_client_->CancelRequest(); | 1866 wallet_client_->CancelRequest(); |
| 1867 EXPECT_FALSE(wallet_client_->HasRequestInProgress()); | 1867 EXPECT_FALSE(wallet_client_->HasRequestInProgress()); |
| 1868 } | 1868 } |
| 1869 | 1869 |
| 1870 } // namespace wallet | 1870 } // namespace wallet |
| 1871 } // namespace autofill | 1871 } // namespace autofill |
| OLD | NEW |