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 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1165 " <option value=\"US\">United States</option>" | 1165 " <option value=\"US\">United States</option>" |
1166 " </select><br>" | 1166 " </select><br>" |
1167 "<label for=\"phone\">Phone number:</label>" | 1167 "<label for=\"phone\">Phone number:</label>" |
1168 " <input type=\"text\" id=\"phone\"><br>" | 1168 " <input type=\"text\" id=\"phone\"><br>" |
1169 "</form>"))); | 1169 "</form>"))); |
1170 | 1170 |
1171 // Invoke Autofill. | 1171 // Invoke Autofill. |
1172 TryBasicFormFill(); | 1172 TryBasicFormFill(); |
1173 } | 1173 } |
1174 | 1174 |
| 1175 // Flakily fails on ChromeOS (crbug.com/646576). |
| 1176 #if defined(OS_CHROMEOS) |
| 1177 #define MAYBE_DynamicFormFill DISABLED_DynamicFormFill |
| 1178 #else |
| 1179 #define MAYBE_DynamicFormFill DynamicFormFill |
| 1180 #endif |
1175 // Test that we can Autofill dynamically generated forms. | 1181 // Test that we can Autofill dynamically generated forms. |
1176 IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, DynamicFormFill) { | 1182 IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, MAYBE_DynamicFormFill) { |
1177 CreateTestProfile(); | 1183 CreateTestProfile(); |
1178 | 1184 |
1179 // Load the test page. | 1185 // Load the test page. |
1180 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 1186 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
1181 GURL(std::string(kDataURIPrefix) + | 1187 GURL(std::string(kDataURIPrefix) + |
1182 "<form id=\"form\" action=\"http://www.example.com/\"" | 1188 "<form id=\"form\" action=\"http://www.example.com/\"" |
1183 " method=\"POST\"></form>" | 1189 " method=\"POST\"></form>" |
1184 "<script>" | 1190 "<script>" |
1185 "function AddElement(name, label) {" | 1191 "function AddElement(name, label) {" |
1186 " var form = document.getElementById('form');" | 1192 " var form = document.getElementById('form');" |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1715 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 1721 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
1716 GURL(std::string(kDataURIPrefix) + kTestPasswordFormString))); | 1722 GURL(std::string(kDataURIPrefix) + kTestPasswordFormString))); |
1717 ASSERT_TRUE(content::ExecuteScript( | 1723 ASSERT_TRUE(content::ExecuteScript( |
1718 GetRenderViewHost(), | 1724 GetRenderViewHost(), |
1719 "document.getElementById('user').value = 'user';")); | 1725 "document.getElementById('user').value = 'user';")); |
1720 FocusFieldByName("password"); | 1726 FocusFieldByName("password"); |
1721 PasteStringAndWait("foobar"); | 1727 PasteStringAndWait("foobar"); |
1722 } | 1728 } |
1723 | 1729 |
1724 } // namespace autofill | 1730 } // namespace autofill |
OLD | NEW |