| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/scoped_ptr.h" | 5 #include "base/scoped_ptr.h" |
| 6 #include "base/scoped_vector.h" | 6 #include "base/scoped_vector.h" |
| 7 #include "base/utf_string_conversions.h" |
| 7 #include "chrome/browser/autofill/fax_field.h" | 8 #include "chrome/browser/autofill/fax_field.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "webkit/glue/form_field.h" | 10 #include "webkit/glue/form_field.h" |
| 10 | 11 |
| 11 namespace { | 12 namespace { |
| 12 | 13 |
| 13 class FaxFieldTest : public testing::Test { | 14 class FaxFieldTest : public testing::Test { |
| 14 public: | 15 public: |
| 15 FaxFieldTest() {} | 16 FaxFieldTest() {} |
| 16 | 17 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 iter_ = list_.begin(); | 52 iter_ = list_.begin(); |
| 52 field_.reset(FaxField::Parse(&iter_)); | 53 field_.reset(FaxField::Parse(&iter_)); |
| 53 ASSERT_NE(static_cast<FaxField*>(NULL), field_.get()); | 54 ASSERT_NE(static_cast<FaxField*>(NULL), field_.get()); |
| 54 ASSERT_TRUE(field_->GetFieldInfo(&field_type_map_)); | 55 ASSERT_TRUE(field_->GetFieldInfo(&field_type_map_)); |
| 55 ASSERT_TRUE( | 56 ASSERT_TRUE( |
| 56 field_type_map_.find(ASCIIToUTF16("fax1")) != field_type_map_.end()); | 57 field_type_map_.find(ASCIIToUTF16("fax1")) != field_type_map_.end()); |
| 57 EXPECT_EQ(PHONE_FAX_WHOLE_NUMBER, field_type_map_[ASCIIToUTF16("fax1")]); | 58 EXPECT_EQ(PHONE_FAX_WHOLE_NUMBER, field_type_map_[ASCIIToUTF16("fax1")]); |
| 58 } | 59 } |
| 59 | 60 |
| 60 } // namespace | 61 } // namespace |
| OLD | NEW |