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 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 // Test that form filling works after reloading the current page. | 1269 // Test that form filling works after reloading the current page. |
1270 IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, AutofillAfterReload) { | 1270 IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, AutofillAfterReload) { |
1271 CreateTestProfile(); | 1271 CreateTestProfile(); |
1272 | 1272 |
1273 // Load the test page. | 1273 // Load the test page. |
1274 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 1274 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
1275 GURL(std::string(kDataURIPrefix) + kTestFormString))); | 1275 GURL(std::string(kDataURIPrefix) + kTestFormString))); |
1276 | 1276 |
1277 // Reload the page. | 1277 // Reload the page. |
1278 content::WebContents* web_contents = GetWebContents(); | 1278 content::WebContents* web_contents = GetWebContents(); |
1279 web_contents->GetController().Reload(false); | 1279 web_contents->GetController().Reload(content::ReloadType::NORMAL, false); |
1280 content::WaitForLoadStop(web_contents); | 1280 content::WaitForLoadStop(web_contents); |
1281 | 1281 |
1282 // Invoke Autofill. | 1282 // Invoke Autofill. |
1283 TryBasicFormFill(); | 1283 TryBasicFormFill(); |
1284 } | 1284 } |
1285 | 1285 |
1286 // Test that filling a form sends all the expected events to the different | 1286 // Test that filling a form sends all the expected events to the different |
1287 // fields being filled. | 1287 // fields being filled. |
1288 // Flakily fails on ChromeOS (crbug.com/646576). | 1288 // Flakily fails on ChromeOS (crbug.com/646576). |
1289 #if defined(OS_CHROMEOS) | 1289 #if defined(OS_CHROMEOS) |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 1727 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
1728 GURL(std::string(kDataURIPrefix) + kTestPasswordFormString))); | 1728 GURL(std::string(kDataURIPrefix) + kTestPasswordFormString))); |
1729 ASSERT_TRUE(content::ExecuteScript( | 1729 ASSERT_TRUE(content::ExecuteScript( |
1730 GetRenderViewHost(), | 1730 GetRenderViewHost(), |
1731 "document.getElementById('user').value = 'user';")); | 1731 "document.getElementById('user').value = 'user';")); |
1732 FocusFieldByName("password"); | 1732 FocusFieldByName("password"); |
1733 PasteStringAndWait("foobar"); | 1733 PasteStringAndWait("foobar"); |
1734 } | 1734 } |
1735 | 1735 |
1736 } // namespace autofill | 1736 } // namespace autofill |
OLD | NEW |