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 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1268 "};" | 1268 "};" |
1269 "</script>"))); | 1269 "</script>"))); |
1270 | 1270 |
1271 // Dynamically construct the form. | 1271 // Dynamically construct the form. |
1272 ASSERT_TRUE(content::ExecuteScript(GetRenderViewHost(), "BuildForm();")); | 1272 ASSERT_TRUE(content::ExecuteScript(GetRenderViewHost(), "BuildForm();")); |
1273 | 1273 |
1274 // Invoke Autofill. | 1274 // Invoke Autofill. |
1275 TryBasicFormFill(); | 1275 TryBasicFormFill(); |
1276 } | 1276 } |
1277 | 1277 |
| 1278 // https://crbug.com/708861 tracks test flakiness. |
| 1279 #if defined(OS_CHROMEOS) |
| 1280 #define MAYBE_AutofillAfterReload DISABLED_AutofillAfterReload |
| 1281 #else |
| 1282 #define MAYBE_AutofillAfterReload AutofillAfterReload |
| 1283 #endif |
1278 // Test that form filling works after reloading the current page. | 1284 // Test that form filling works after reloading the current page. |
1279 IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, AutofillAfterReload) { | 1285 IN_PROC_BROWSER_TEST_F(AutofillInteractiveTest, MAYBE_AutofillAfterReload) { |
1280 CreateTestProfile(); | 1286 CreateTestProfile(); |
1281 | 1287 |
1282 // Load the test page. | 1288 // Load the test page. |
1283 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), | 1289 ASSERT_NO_FATAL_FAILURE(ui_test_utils::NavigateToURL(browser(), |
1284 GURL(std::string(kDataURIPrefix) + kTestFormString))); | 1290 GURL(std::string(kDataURIPrefix) + kTestFormString))); |
1285 | 1291 |
1286 // Reload the page. | 1292 // Reload the page. |
1287 content::WebContents* web_contents = GetWebContents(); | 1293 content::WebContents* web_contents = GetWebContents(); |
1288 web_contents->GetController().Reload(content::ReloadType::NORMAL, false); | 1294 web_contents->GetController().Reload(content::ReloadType::NORMAL, false); |
1289 content::WaitForLoadStop(web_contents); | 1295 content::WaitForLoadStop(web_contents); |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1810 std::string value; | 1816 std::string value; |
1811 ASSERT_TRUE(content::ExecuteScriptAndExtractString( | 1817 ASSERT_TRUE(content::ExecuteScriptAndExtractString( |
1812 cross_frame, | 1818 cross_frame, |
1813 "window.domAutomationController.send(" | 1819 "window.domAutomationController.send(" |
1814 " document.getElementById('NAME_FIRST').value);", | 1820 " document.getElementById('NAME_FIRST').value);", |
1815 &value)); | 1821 &value)); |
1816 EXPECT_EQ("Milton", value); | 1822 EXPECT_EQ("Milton", value); |
1817 } | 1823 } |
1818 | 1824 |
1819 } // namespace autofill | 1825 } // namespace autofill |
OLD | NEW |