OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1484 // Simulate the render notifying the translation has been done. | 1484 // Simulate the render notifying the translation has been done. |
1485 translation_observer.Wait(); | 1485 translation_observer.Wait(); |
1486 | 1486 |
1487 TryBasicFormFill(); | 1487 TryBasicFormFill(); |
1488 } | 1488 } |
1489 | 1489 |
1490 // Test phone fields parse correctly from a given profile. | 1490 // Test phone fields parse correctly from a given profile. |
1491 // The high level key presses execute the following: Select the first text | 1491 // The high level key presses execute the following: Select the first text |
1492 // field, invoke the autofill popup list, select the first profile within the | 1492 // field, invoke the autofill popup list, select the first profile within the |
1493 // list, and commit to the profile to populate the form. | 1493 // list, and commit to the profile to populate the form. |
1494 // Flakily times out on windows. http://crbug.com/390564 | 1494 // Flakily times out on windows (https://crbug.com/390564), and on CrOS |
1495 // Flaky on the official cros-trunk crbug.com/516052 | 1495 // (https://crbug.com/516052). |
1496 #if defined(OS_WIN) || defined(OFFICIAL_BUILD) | 1496 #if defined(OS_WIN) || defined(OS_CHROMEOS) |
1497 #define MAYBE_ComparePhoneNumbers DISABLED_ComparePhoneNumbers | 1497 #define MAYBE_ComparePhoneNumbers DISABLED_ComparePhoneNumbers |
1498 #else | 1498 #else |
1499 #define MAYBE_ComparePhoneNumbers ComparePhoneNumbers | 1499 #define MAYBE_ComparePhoneNumbers ComparePhoneNumbers |
1500 #endif // defined(OS_WIN) || defined(OFFICIAL_BUILD) | 1500 #endif // defined(OS_WIN) || defined(OS_CHROMEOS) |
1501 IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, MAYBE_ComparePhoneNumbers) { | 1501 IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, MAYBE_ComparePhoneNumbers) { |
1502 AutofillProfile profile; | 1502 AutofillProfile profile; |
1503 profile.SetRawInfo(NAME_FIRST, ASCIIToUTF16("Bob")); | 1503 profile.SetRawInfo(NAME_FIRST, ASCIIToUTF16("Bob")); |
1504 profile.SetRawInfo(NAME_LAST, ASCIIToUTF16("Smith")); | 1504 profile.SetRawInfo(NAME_LAST, ASCIIToUTF16("Smith")); |
1505 profile.SetRawInfo(ADDRESS_HOME_LINE1, ASCIIToUTF16("1234 H St.")); | 1505 profile.SetRawInfo(ADDRESS_HOME_LINE1, ASCIIToUTF16("1234 H St.")); |
1506 profile.SetRawInfo(ADDRESS_HOME_CITY, ASCIIToUTF16("San Jose")); | 1506 profile.SetRawInfo(ADDRESS_HOME_CITY, ASCIIToUTF16("San Jose")); |
1507 profile.SetRawInfo(ADDRESS_HOME_STATE, ASCIIToUTF16("CA")); | 1507 profile.SetRawInfo(ADDRESS_HOME_STATE, ASCIIToUTF16("CA")); |
1508 profile.SetRawInfo(ADDRESS_HOME_ZIP, ASCIIToUTF16("95110")); | 1508 profile.SetRawInfo(ADDRESS_HOME_ZIP, ASCIIToUTF16("95110")); |
1509 profile.SetRawInfo(PHONE_HOME_WHOLE_NUMBER, ASCIIToUTF16("1-408-555-4567")); | 1509 profile.SetRawInfo(PHONE_HOME_WHOLE_NUMBER, ASCIIToUTF16("1-408-555-4567")); |
1510 SetTestProfile(browser(), profile); | 1510 SetTestProfile(browser(), profile); |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1810 std::string value; | 1810 std::string value; |
1811 ASSERT_TRUE(content::ExecuteScriptAndExtractString( | 1811 ASSERT_TRUE(content::ExecuteScriptAndExtractString( |
1812 cross_frame, | 1812 cross_frame, |
1813 "window.domAutomationController.send(" | 1813 "window.domAutomationController.send(" |
1814 " document.getElementById('NAME_FIRST').value);", | 1814 " document.getElementById('NAME_FIRST').value);", |
1815 &value)); | 1815 &value)); |
1816 EXPECT_EQ("Milton", value); | 1816 EXPECT_EQ("Milton", value); |
1817 } | 1817 } |
1818 | 1818 |
1819 } // namespace autofill | 1819 } // namespace autofill |
OLD | NEW |