OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 ui_test_utils::NavigateToURL(browser(), url); | 210 ui_test_utils::NavigateToURL(browser(), url); |
211 | 211 |
212 std::string js; | 212 std::string js; |
213 for (FormMap::const_iterator i = data.begin(); i != data.end(); ++i) { | 213 for (FormMap::const_iterator i = data.begin(); i != data.end(); ++i) { |
214 js += "document.getElementById('" + i->first + "').value = '" + | 214 js += "document.getElementById('" + i->first + "').value = '" + |
215 i->second + "';"; | 215 i->second + "';"; |
216 } | 216 } |
217 js += "document.getElementById('testform').submit();"; | 217 js += "document.getElementById('testform').submit();"; |
218 | 218 |
219 WindowedPersonalDataManagerObserver observer(browser()); | 219 WindowedPersonalDataManagerObserver observer(browser()); |
220 ASSERT_TRUE( | 220 ASSERT_TRUE(content::ExecuteScript(render_view_host(), js)); |
221 content::ExecuteJavaScript(render_view_host(), "", js)); | |
222 observer.Wait(); | 221 observer.Wait(); |
223 } | 222 } |
224 | 223 |
225 void SubmitCreditCard(const char* name, | 224 void SubmitCreditCard(const char* name, |
226 const char* number, | 225 const char* number, |
227 const char* exp_month, | 226 const char* exp_month, |
228 const char* exp_year) { | 227 const char* exp_year) { |
229 FormMap data; | 228 FormMap data; |
230 data["CREDIT_CARD_NAME"] = name; | 229 data["CREDIT_CARD_NAME"] = name; |
231 data["CREDIT_CARD_NUMBER"] = number; | 230 data["CREDIT_CARD_NUMBER"] = number; |
232 data["CREDIT_CARD_EXP_MONTH"] = exp_month; | 231 data["CREDIT_CARD_EXP_MONTH"] = exp_month; |
233 data["CREDIT_CARD_EXP_4_DIGIT_YEAR"] = exp_year; | 232 data["CREDIT_CARD_EXP_4_DIGIT_YEAR"] = exp_year; |
234 FillFormAndSubmit("autofill_creditcard_form.html", data); | 233 FillFormAndSubmit("autofill_creditcard_form.html", data); |
235 } | 234 } |
236 | 235 |
237 // Populates a webpage form using autofill data and keypress events. | 236 // Populates a webpage form using autofill data and keypress events. |
238 // This function focuses the specified input field in the form, and then | 237 // This function focuses the specified input field in the form, and then |
239 // sends keypress events to the tab to cause the form to be populated. | 238 // sends keypress events to the tab to cause the form to be populated. |
240 void PopulateForm(const std::string& field_id) { | 239 void PopulateForm(const std::string& field_id) { |
241 std::string js("document.getElementById('" + field_id + "').focus();"); | 240 std::string js("document.getElementById('" + field_id + "').focus();"); |
242 ASSERT_TRUE( | 241 ASSERT_TRUE(content::ExecuteScript(render_view_host(), js)); |
243 content::ExecuteJavaScript(render_view_host(), "", js)); | |
244 | 242 |
245 SendKeyAndWait(ui::VKEY_DOWN, | 243 SendKeyAndWait(ui::VKEY_DOWN, |
246 chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS); | 244 chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS); |
247 SendKeyAndWait(ui::VKEY_DOWN, | 245 SendKeyAndWait(ui::VKEY_DOWN, |
248 chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA); | 246 chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA); |
249 SendKeyAndWait(ui::VKEY_RETURN, | 247 SendKeyAndWait(ui::VKEY_RETURN, |
250 chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA); | 248 chrome::NOTIFICATION_AUTOFILL_DID_FILL_FORM_DATA); |
251 } | 249 } |
252 | 250 |
253 // Aggregate profiles from forms into Autofill preferences. Returns the number | 251 // Aggregate profiles from forms into Autofill preferences. Returns the number |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 data["PHONE_HOME_WHOLE_NUMBER"] = fields[11]; | 283 data["PHONE_HOME_WHOLE_NUMBER"] = fields[11]; |
286 | 284 |
287 FillFormAndSubmit("duplicate_profiles_test.html", data); | 285 FillFormAndSubmit("duplicate_profiles_test.html", data); |
288 } | 286 } |
289 return lines.size(); | 287 return lines.size(); |
290 } | 288 } |
291 | 289 |
292 void ExpectFieldValue(const std::string& field_name, | 290 void ExpectFieldValue(const std::string& field_name, |
293 const std::string& expected_value) { | 291 const std::string& expected_value) { |
294 std::string value; | 292 std::string value; |
295 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractString( | 293 ASSERT_TRUE(content::ExecuteScriptAndExtractString( |
296 chrome::GetActiveWebContents(browser())->GetRenderViewHost(), | 294 chrome::GetActiveWebContents(browser()), |
297 "", | |
298 "window.domAutomationController.send(" | 295 "window.domAutomationController.send(" |
299 " document.getElementById('" + field_name + "').value);", | 296 " document.getElementById('" + field_name + "').value);", |
300 &value)); | 297 &value)); |
301 EXPECT_EQ(expected_value, value); | 298 EXPECT_EQ(expected_value, value); |
302 } | 299 } |
303 | 300 |
304 RenderViewHost* render_view_host() { | 301 RenderViewHost* render_view_host() { |
305 return chrome::GetActiveWebContents(browser())->GetRenderViewHost(); | 302 return chrome::GetActiveWebContents(browser())->GetRenderViewHost(); |
306 } | 303 } |
307 | 304 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 fetcher->delegate()->OnURLFetchComplete(fetcher); | 342 fetcher->delegate()->OnURLFetchComplete(fetcher); |
346 } | 343 } |
347 | 344 |
348 void FocusFirstNameField() { | 345 void FocusFirstNameField() { |
349 LOG(WARNING) << "Clicking on the tab."; | 346 LOG(WARNING) << "Clicking on the tab."; |
350 content::SimulateMouseClick(chrome::GetActiveWebContents(browser()), 0, | 347 content::SimulateMouseClick(chrome::GetActiveWebContents(browser()), 0, |
351 WebKit::WebMouseEvent::ButtonLeft); | 348 WebKit::WebMouseEvent::ButtonLeft); |
352 | 349 |
353 LOG(WARNING) << "Focusing the first name field."; | 350 LOG(WARNING) << "Focusing the first name field."; |
354 bool result = false; | 351 bool result = false; |
355 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool( | 352 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
356 render_view_host(), | 353 render_view_host(), |
357 "", | |
358 "if (document.readyState === 'complete')" | 354 "if (document.readyState === 'complete')" |
359 " document.getElementById('firstname').focus();" | 355 " document.getElementById('firstname').focus();" |
360 "else" | 356 "else" |
361 " domAutomationController.send(false);", | 357 " domAutomationController.send(false);", |
362 &result)); | 358 &result)); |
363 ASSERT_TRUE(result); | 359 ASSERT_TRUE(result); |
364 } | 360 } |
365 | 361 |
366 void ExpectFilledTestForm() { | 362 void ExpectFilledTestForm() { |
367 ExpectFieldValue("firstname", "Milton"); | 363 ExpectFieldValue("firstname", "Milton"); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 // The form should be filled. | 528 // The form should be filled. |
533 ExpectFilledTestForm(); | 529 ExpectFilledTestForm(); |
534 | 530 |
535 // The change event should have already fired for unfocused fields, both of | 531 // The change event should have already fired for unfocused fields, both of |
536 // <input> and of <select> type. However, it should not yet have fired for the | 532 // <input> and of <select> type. However, it should not yet have fired for the |
537 // focused field. | 533 // focused field. |
538 bool focused_fired = false; | 534 bool focused_fired = false; |
539 bool unfocused_fired = false; | 535 bool unfocused_fired = false; |
540 bool changed_select_fired = false; | 536 bool changed_select_fired = false; |
541 bool unchanged_select_fired = false; | 537 bool unchanged_select_fired = false; |
542 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool( | 538 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
543 render_view_host(), | 539 render_view_host(), |
544 "", | |
545 "domAutomationController.send(focused_fired);", | 540 "domAutomationController.send(focused_fired);", |
546 &focused_fired)); | 541 &focused_fired)); |
547 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool( | 542 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
548 render_view_host(), | 543 render_view_host(), |
549 "", | |
550 "domAutomationController.send(unfocused_fired);", | 544 "domAutomationController.send(unfocused_fired);", |
551 &unfocused_fired)); | 545 &unfocused_fired)); |
552 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool( | 546 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
553 render_view_host(), | 547 render_view_host(), |
554 "", | |
555 "domAutomationController.send(changed_select_fired);", | 548 "domAutomationController.send(changed_select_fired);", |
556 &changed_select_fired)); | 549 &changed_select_fired)); |
557 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool( | 550 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
558 render_view_host(), | 551 render_view_host(), |
559 "", | |
560 "domAutomationController.send(unchanged_select_fired);", | 552 "domAutomationController.send(unchanged_select_fired);", |
561 &unchanged_select_fired)); | 553 &unchanged_select_fired)); |
562 EXPECT_FALSE(focused_fired); | 554 EXPECT_FALSE(focused_fired); |
563 EXPECT_TRUE(unfocused_fired); | 555 EXPECT_TRUE(unfocused_fired); |
564 EXPECT_TRUE(changed_select_fired); | 556 EXPECT_TRUE(changed_select_fired); |
565 EXPECT_FALSE(unchanged_select_fired); | 557 EXPECT_FALSE(unchanged_select_fired); |
566 | 558 |
567 // Unfocus the first name field. Its change event should fire. | 559 // Unfocus the first name field. Its change event should fire. |
568 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool( | 560 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
569 render_view_host(), | 561 render_view_host(), |
570 "", | |
571 "document.getElementById('firstname').blur();" | 562 "document.getElementById('firstname').blur();" |
572 "domAutomationController.send(focused_fired);", &focused_fired)); | 563 "domAutomationController.send(focused_fired);", &focused_fired)); |
573 EXPECT_TRUE(focused_fired); | 564 EXPECT_TRUE(focused_fired); |
574 } | 565 } |
575 | 566 |
576 // Test that we can autofill forms distinguished only by their |id| attribute. | 567 // Test that we can autofill forms distinguished only by their |id| attribute. |
577 // DISABLED: http://crbug.com/150084 | 568 // DISABLED: http://crbug.com/150084 |
578 IN_PROC_BROWSER_TEST_F(AutofillTest, DISABLED_AutofillFormsDistinguishedById) { | 569 IN_PROC_BROWSER_TEST_F(AutofillTest, DISABLED_AutofillFormsDistinguishedById) { |
579 CreateTestProfile(); | 570 CreateTestProfile(); |
580 | 571 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 "" | 764 "" |
774 " for (var i = 0; i < elements.length; i++) {" | 765 " for (var i = 0; i < elements.length; i++) {" |
775 " var name = elements[i][0];" | 766 " var name = elements[i][0];" |
776 " var label = elements[i][1];" | 767 " var label = elements[i][1];" |
777 " AddElement(name, label);" | 768 " AddElement(name, label);" |
778 " }" | 769 " }" |
779 "};" | 770 "};" |
780 "</script>"))); | 771 "</script>"))); |
781 | 772 |
782 // Dynamically construct the form. | 773 // Dynamically construct the form. |
783 ASSERT_TRUE(content::ExecuteJavaScript(render_view_host(), "", | 774 ASSERT_TRUE(content::ExecuteScript(render_view_host(), "BuildForm();")); |
784 "BuildForm();")); | |
785 | 775 |
786 // Invoke Autofill. | 776 // Invoke Autofill. |
787 TryBasicFormFill(); | 777 TryBasicFormFill(); |
788 } | 778 } |
789 | 779 |
790 // Test that form filling works after reloading the current page. | 780 // Test that form filling works after reloading the current page. |
791 // This test brought to you by http://crbug.com/69204 | 781 // This test brought to you by http://crbug.com/69204 |
792 #if defined(OS_MACOSX) | 782 #if defined(OS_MACOSX) |
793 // Now flaky on everything but mac. | 783 // Now flaky on everything but mac. |
794 // http://crbug.com/150084 | 784 // http://crbug.com/150084 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 // Pass fake google.translate lib as the translate script. | 862 // Pass fake google.translate lib as the translate script. |
873 SimulateURLFetch(true); | 863 SimulateURLFetch(true); |
874 | 864 |
875 content::WindowedNotificationObserver translation_observer( | 865 content::WindowedNotificationObserver translation_observer( |
876 chrome::NOTIFICATION_PAGE_TRANSLATED, | 866 chrome::NOTIFICATION_PAGE_TRANSLATED, |
877 content::NotificationService::AllSources()); | 867 content::NotificationService::AllSources()); |
878 | 868 |
879 // Simulate translation to kick onTranslateElementLoad. | 869 // Simulate translation to kick onTranslateElementLoad. |
880 // But right now, the call stucks here. | 870 // But right now, the call stucks here. |
881 // Once click the text field, it starts again. | 871 // Once click the text field, it starts again. |
882 ASSERT_TRUE(content::ExecuteJavaScript( | 872 ASSERT_TRUE(content::ExecuteScript( |
883 render_view_host(), | 873 render_view_host(), "cr.googleTranslate.onTranslateElementLoad();")); |
884 "", | |
885 "cr.googleTranslate.onTranslateElementLoad();")); | |
886 | 874 |
887 // Simulate the render notifying the translation has been done. | 875 // Simulate the render notifying the translation has been done. |
888 translation_observer.Wait(); | 876 translation_observer.Wait(); |
889 | 877 |
890 TryBasicFormFill(); | 878 TryBasicFormFill(); |
891 } | 879 } |
892 | 880 |
893 // Test filling profiles with unicode strings and crazy characters. | 881 // Test filling profiles with unicode strings and crazy characters. |
894 // TODO(isherman): rewrite as unit test under PersonalDataManagerTest. | 882 // TODO(isherman): rewrite as unit test under PersonalDataManagerTest. |
895 IN_PROC_BROWSER_TEST_F(AutofillTest, FillProfileCrazyCharacters) { | 883 IN_PROC_BROWSER_TEST_F(AutofillTest, FillProfileCrazyCharacters) { |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1363 // 3. Fill form using a saved profile. | 1351 // 3. Fill form using a saved profile. |
1364 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_FormFillableOnReset) { | 1352 IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_FormFillableOnReset) { |
1365 ASSERT_TRUE(test_server()->Start()); | 1353 ASSERT_TRUE(test_server()->Start()); |
1366 | 1354 |
1367 CreateTestProfile(); | 1355 CreateTestProfile(); |
1368 | 1356 |
1369 GURL url = test_server()->GetURL("files/autofill/autofill_test_form.html"); | 1357 GURL url = test_server()->GetURL("files/autofill/autofill_test_form.html"); |
1370 ui_test_utils::NavigateToURL(browser(), url); | 1358 ui_test_utils::NavigateToURL(browser(), url); |
1371 PopulateForm("NAME_FIRST"); | 1359 PopulateForm("NAME_FIRST"); |
1372 | 1360 |
1373 ASSERT_TRUE(content::ExecuteJavaScript( | 1361 ASSERT_TRUE(content::ExecuteScript( |
1374 chrome::GetActiveWebContents(browser())->GetRenderViewHost(), | 1362 chrome::GetActiveWebContents(browser()), |
1375 "", | |
1376 "document.getElementById('testform').reset()")); | 1363 "document.getElementById('testform').reset()")); |
1377 | 1364 |
1378 PopulateForm("NAME_FIRST"); | 1365 PopulateForm("NAME_FIRST"); |
1379 | 1366 |
1380 ExpectFieldValue("NAME_FIRST", "Milton"); | 1367 ExpectFieldValue("NAME_FIRST", "Milton"); |
1381 ExpectFieldValue("NAME_LAST", "Waddams"); | 1368 ExpectFieldValue("NAME_LAST", "Waddams"); |
1382 ExpectFieldValue("EMAIL_ADDRESS", "red.swingline@initech.com"); | 1369 ExpectFieldValue("EMAIL_ADDRESS", "red.swingline@initech.com"); |
1383 ExpectFieldValue("ADDRESS_HOME_LINE1", "4120 Freidrich Lane"); | 1370 ExpectFieldValue("ADDRESS_HOME_LINE1", "4120 Freidrich Lane"); |
1384 ExpectFieldValue("ADDRESS_HOME_CITY", "Austin"); | 1371 ExpectFieldValue("ADDRESS_HOME_CITY", "Austin"); |
1385 ExpectFieldValue("ADDRESS_HOME_STATE", "Texas"); | 1372 ExpectFieldValue("ADDRESS_HOME_STATE", "Texas"); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1515 GURL url = test_server()->GetURL( | 1502 GURL url = test_server()->GetURL( |
1516 "files/autofill/latency_after_submit_test.html"); | 1503 "files/autofill/latency_after_submit_test.html"); |
1517 ui_test_utils::NavigateToURL(browser(), url); | 1504 ui_test_utils::NavigateToURL(browser(), url); |
1518 PopulateForm("NAME_FIRST"); | 1505 PopulateForm("NAME_FIRST"); |
1519 | 1506 |
1520 content::WindowedNotificationObserver load_stop_observer( | 1507 content::WindowedNotificationObserver load_stop_observer( |
1521 content::NOTIFICATION_LOAD_STOP, | 1508 content::NOTIFICATION_LOAD_STOP, |
1522 content::Source<content::NavigationController>( | 1509 content::Source<content::NavigationController>( |
1523 &chrome::GetActiveWebContents(browser())->GetController())); | 1510 &chrome::GetActiveWebContents(browser())->GetController())); |
1524 | 1511 |
1525 ASSERT_TRUE(content::ExecuteJavaScript( | 1512 ASSERT_TRUE(content::ExecuteScript( |
1526 render_view_host(), | 1513 render_view_host(), |
1527 "", | |
1528 "document.getElementById('testform').submit();")); | 1514 "document.getElementById('testform').submit();")); |
1529 // This will ensure the test didn't hang. | 1515 // This will ensure the test didn't hang. |
1530 load_stop_observer.Wait(); | 1516 load_stop_observer.Wait(); |
1531 } | 1517 } |
1532 | 1518 |
1533 // http://crbug.com/150084 | 1519 // http://crbug.com/150084 |
1534 #if defined(OS_MACOSX) | 1520 #if defined(OS_MACOSX) |
1535 #define MAYBE_DisableAutocompleteWhileFilling DisableAutocompleteWhileFilling | 1521 #define MAYBE_DisableAutocompleteWhileFilling DisableAutocompleteWhileFilling |
1536 #else | 1522 #else |
1537 #define MAYBE_DisableAutocompleteWhileFilling \ | 1523 #define MAYBE_DisableAutocompleteWhileFilling \ |
(...skipping 10 matching lines...) Expand all Loading... |
1548 GURL(std::string(kDataURIPrefix) + kTestFormString))); | 1534 GURL(std::string(kDataURIPrefix) + kTestFormString))); |
1549 | 1535 |
1550 // Invoke Autofill: Start filling the first name field with "M" and wait for | 1536 // Invoke Autofill: Start filling the first name field with "M" and wait for |
1551 // the popup to be shown. | 1537 // the popup to be shown. |
1552 FocusFirstNameField(); | 1538 FocusFirstNameField(); |
1553 SendKeyAndWait( | 1539 SendKeyAndWait( |
1554 ui::VKEY_M, chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS); | 1540 ui::VKEY_M, chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS); |
1555 | 1541 |
1556 // Now that the popup with suggestions is showing, disable autocomplete for | 1542 // Now that the popup with suggestions is showing, disable autocomplete for |
1557 // the active field. | 1543 // the active field. |
1558 ASSERT_TRUE(content::ExecuteJavaScript( | 1544 ASSERT_TRUE(content::ExecuteScript( |
1559 render_view_host(), | 1545 render_view_host(), |
1560 "", | |
1561 "document.querySelector('input').autocomplete = 'off';")); | 1546 "document.querySelector('input').autocomplete = 'off';")); |
1562 | 1547 |
1563 // Press the down arrow to select the suggestion and attempt to preview the | 1548 // Press the down arrow to select the suggestion and attempt to preview the |
1564 // autofilled form. | 1549 // autofilled form. |
1565 content::SimulateKeyPress(chrome::GetActiveWebContents(browser()), | 1550 content::SimulateKeyPress(chrome::GetActiveWebContents(browser()), |
1566 ui::VKEY_DOWN, false, false, false, false); | 1551 ui::VKEY_DOWN, false, false, false, false); |
1567 | 1552 |
1568 // Wait for any IPCs to complete by performing an action that generates an | 1553 // Wait for any IPCs to complete by performing an action that generates an |
1569 // IPC that's easy to wait for. Chrome shouldn't crash. | 1554 // IPC that's easy to wait for. Chrome shouldn't crash. |
1570 bool result = false; | 1555 bool result = false; |
1571 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool( | 1556 ASSERT_TRUE(content::ExecuteScriptAndExtractBool( |
1572 render_view_host(), | 1557 render_view_host(), |
1573 "", | |
1574 "var city = document.getElementById('city');" | 1558 "var city = document.getElementById('city');" |
1575 "city.onfocus = function() { domAutomationController.send(true); };" | 1559 "city.onfocus = function() { domAutomationController.send(true); };" |
1576 "city.focus()", | 1560 "city.focus()", |
1577 &result)); | 1561 &result)); |
1578 ASSERT_TRUE(result); | 1562 ASSERT_TRUE(result); |
1579 SendKeyAndWait( | 1563 SendKeyAndWait( |
1580 ui::VKEY_A, chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS); | 1564 ui::VKEY_A, chrome::NOTIFICATION_AUTOFILL_DID_SHOW_SUGGESTIONS); |
1581 } | 1565 } |
1582 | 1566 |
1583 // Test that profiles merge for aggregated data with same address. | 1567 // Test that profiles merge for aggregated data with same address. |
(...skipping 25 matching lines...) Expand all Loading... |
1609 // TODO(isherman): this looks redundant, consider removing. | 1593 // TODO(isherman): this looks redundant, consider removing. |
1610 // DISABLED: http://crbug.com/150084 | 1594 // DISABLED: http://crbug.com/150084 |
1611 IN_PROC_BROWSER_TEST_F(AutofillTest, | 1595 IN_PROC_BROWSER_TEST_F(AutofillTest, |
1612 DISABLED_MergeAggregatedDuplicatedProfiles) { | 1596 DISABLED_MergeAggregatedDuplicatedProfiles) { |
1613 int num_of_profiles = | 1597 int num_of_profiles = |
1614 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); | 1598 AggregateProfilesIntoAutofillPrefs("dataset_no_address.txt"); |
1615 | 1599 |
1616 ASSERT_GT(num_of_profiles, | 1600 ASSERT_GT(num_of_profiles, |
1617 static_cast<int>(personal_data_manager()->GetProfiles().size())); | 1601 static_cast<int>(personal_data_manager()->GetProfiles().size())); |
1618 } | 1602 } |
OLD | NEW |