OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 AutoreleasePool()->Recycle(); | 340 AutoreleasePool()->Recycle(); |
341 #endif | 341 #endif |
342 } | 342 } |
343 | 343 |
344 void InitializeControllerWithoutShowing() { | 344 void InitializeControllerWithoutShowing() { |
345 if (controller_) | 345 if (controller_) |
346 controller_->Hide(); | 346 controller_->Hide(); |
347 | 347 |
348 FormData form; | 348 FormData form; |
349 form.name = ASCIIToUTF16("TestForm"); | 349 form.name = ASCIIToUTF16("TestForm"); |
350 form.method = ASCIIToUTF16("POST"); | |
351 form.user_submitted = true; | 350 form.user_submitted = true; |
352 | 351 |
353 FormFieldData field; | 352 FormFieldData field; |
354 field.autocomplete_attribute = "shipping tel"; | 353 field.autocomplete_attribute = "shipping tel"; |
355 form.fields.push_back(field); | 354 form.fields.push_back(field); |
356 | 355 |
357 FormFieldData cc; | 356 FormFieldData cc; |
358 cc.autocomplete_attribute = "cc-number"; | 357 cc.autocomplete_attribute = "cc-number"; |
359 form.fields.push_back(cc); | 358 form.fields.push_back(cc); |
360 | 359 |
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1767 "<input autocomplete='transaction-currency' value='USD'>" | 1766 "<input autocomplete='transaction-currency' value='USD'>" |
1768 "<input autocomplete='cc-csc'>"); | 1767 "<input autocomplete='cc-csc'>"); |
1769 AutofillDialogControllerImpl* controller = SetUpHtmlAndInvoke(html); | 1768 AutofillDialogControllerImpl* controller = SetUpHtmlAndInvoke(html); |
1770 ASSERT_TRUE(controller); | 1769 ASSERT_TRUE(controller); |
1771 | 1770 |
1772 EXPECT_EQ(ASCIIToUTF16("24"), controller->transaction_amount_); | 1771 EXPECT_EQ(ASCIIToUTF16("24"), controller->transaction_amount_); |
1773 EXPECT_EQ(ASCIIToUTF16("USD"), controller->transaction_currency_); | 1772 EXPECT_EQ(ASCIIToUTF16("USD"), controller->transaction_currency_); |
1774 } | 1773 } |
1775 | 1774 |
1776 } // namespace autofill | 1775 } // namespace autofill |
OLD | NEW |