| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 EnableDOMAutomation(); | 70 EnableDOMAutomation(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void CreateTestProfile() { | 73 void CreateTestProfile() { |
| 74 autofill_test::DisableSystemServices(browser()->profile()); | 74 autofill_test::DisableSystemServices(browser()->profile()); |
| 75 | 75 |
| 76 AutofillProfile profile; | 76 AutofillProfile profile; |
| 77 autofill_test::SetProfileInfo( | 77 autofill_test::SetProfileInfo( |
| 78 &profile, "Milton", "C.", "Waddams", | 78 &profile, "Milton", "C.", "Waddams", |
| 79 "red.swingline@initech.com", "Initech", "4120 Freidrich Lane", | 79 "red.swingline@initech.com", "Initech", "4120 Freidrich Lane", |
| 80 "Basement", "Austin", "Texas", "78744", "United States", "5125551234", | 80 "Basement", "Austin", "Texas", "78744", "United States", "5125551234"); |
| 81 "5125550000"); | |
| 82 | 81 |
| 83 PersonalDataManager* personal_data_manager = | 82 PersonalDataManager* personal_data_manager = |
| 84 browser()->profile()->GetPersonalDataManager(); | 83 browser()->profile()->GetPersonalDataManager(); |
| 85 ASSERT_TRUE(personal_data_manager); | 84 ASSERT_TRUE(personal_data_manager); |
| 86 | 85 |
| 87 personal_data_manager->AddProfile(profile); | 86 personal_data_manager->AddProfile(profile); |
| 88 } | 87 } |
| 89 | 88 |
| 90 void ExpectFieldValue(const std::wstring& field_name, | 89 void ExpectFieldValue(const std::wstring& field_name, |
| 91 const std::string& expected_value) { | 90 const std::string& expected_value) { |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 // Once click the text field, it starts again. | 615 // Once click the text field, it starts again. |
| 617 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( | 616 ASSERT_TRUE(ui_test_utils::ExecuteJavaScript( |
| 618 render_view_host(), L"", | 617 render_view_host(), L"", |
| 619 L"cr.googleTranslate.onTranslateElementLoad();")); | 618 L"cr.googleTranslate.onTranslateElementLoad();")); |
| 620 | 619 |
| 621 // Simulate the render notifying the translation has been done. | 620 // Simulate the render notifying the translation has been done. |
| 622 ui_test_utils::WaitForNotification(chrome::NOTIFICATION_PAGE_TRANSLATED); | 621 ui_test_utils::WaitForNotification(chrome::NOTIFICATION_PAGE_TRANSLATED); |
| 623 | 622 |
| 624 TryBasicFormFill(); | 623 TryBasicFormFill(); |
| 625 } | 624 } |
| OLD | NEW |