| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/webui/options/autofill_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/autofill_options_handler.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "components/autofill/core/browser/autofill_profile.h" | 8 #include "components/autofill/core/browser/autofill_profile.h" |
| 9 #include "components/autofill/core/browser/autofill_test_utils.h" | 9 #include "components/autofill/core/browser/autofill_test_utils.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 EXPECT_TRUE(dictionary.GetString("guid", &value)); | 44 EXPECT_TRUE(dictionary.GetString("guid", &value)); |
| 45 EXPECT_EQ("guid", value); | 45 EXPECT_EQ("guid", value); |
| 46 EXPECT_TRUE(dictionary.GetString("languageCode", &value)); | 46 EXPECT_TRUE(dictionary.GetString("languageCode", &value)); |
| 47 EXPECT_EQ("", value); | 47 EXPECT_EQ("", value); |
| 48 EXPECT_TRUE(dictionary.GetString("postalCode", &value)); | 48 EXPECT_TRUE(dictionary.GetString("postalCode", &value)); |
| 49 EXPECT_EQ("77300", value); | 49 EXPECT_EQ("77300", value); |
| 50 EXPECT_TRUE(dictionary.GetString("sortingCode", &value)); | 50 EXPECT_TRUE(dictionary.GetString("sortingCode", &value)); |
| 51 EXPECT_EQ("", value); | 51 EXPECT_EQ("", value); |
| 52 EXPECT_TRUE(dictionary.GetString("state", &value)); | 52 EXPECT_TRUE(dictionary.GetString("state", &value)); |
| 53 EXPECT_EQ("TX", value); | 53 EXPECT_EQ("TX", value); |
| 54 | 54 EXPECT_TRUE(dictionary.GetString("email", &value)); |
| 55 base::ListValue* list_value; | |
| 56 EXPECT_TRUE(dictionary.GetList("email", &list_value)); | |
| 57 EXPECT_EQ(1U, list_value->GetSize()); | |
| 58 EXPECT_TRUE(list_value->GetString(0, &value)); | |
| 59 EXPECT_EQ("fml@example.com", value); | 55 EXPECT_EQ("fml@example.com", value); |
| 60 | 56 EXPECT_TRUE(dictionary.GetString("fullName", &value)); |
| 61 EXPECT_TRUE(dictionary.GetList("fullName", &list_value)); | |
| 62 EXPECT_EQ(1U, list_value->GetSize()); | |
| 63 EXPECT_TRUE(list_value->GetString(0, &value)); | |
| 64 EXPECT_EQ("First Middle Last", value); | 57 EXPECT_EQ("First Middle Last", value); |
| 65 | 58 EXPECT_TRUE(dictionary.GetString("phone", &value)); |
| 66 EXPECT_TRUE(dictionary.GetList("phone", &list_value)); | |
| 67 EXPECT_EQ(1U, list_value->GetSize()); | |
| 68 EXPECT_TRUE(list_value->GetString(0, &value)); | |
| 69 EXPECT_EQ("832-555-1000", value); | 59 EXPECT_EQ("832-555-1000", value); |
| 70 } | 60 } |
| 71 | 61 |
| 72 } // namespace options | 62 } // namespace options |
| OLD | NEW |