Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(763)

Side by Side Diff: chrome/test/functional/autofill.py

Issue 9696018: Update pyauto tests to work with the uber page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: rebase Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | chrome/test/functional/chromeos_time.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import logging 6 import logging
7 import os 7 import os
8 import pickle 8 import pickle
9 import re 9 import re
10 10
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 page = settings.AutofillEditAddressDialog.FromNavigation(driver) 767 page = settings.AutofillEditAddressDialog.FromNavigation(driver)
768 non_duplicates = ['111-1111', '222-2222'] 768 non_duplicates = ['111-1111', '222-2222']
769 duplicates = ['111-1111'] 769 duplicates = ['111-1111']
770 page.Fill(phones=non_duplicates + duplicates) 770 page.Fill(phones=non_duplicates + duplicates)
771 self.assertEqual(non_duplicates, page.GetPhones(), 771 self.assertEqual(non_duplicates, page.GetPhones(),
772 msg='Duplicate phone number in prefs unexpectedly saved.') 772 msg='Duplicate phone number in prefs unexpectedly saved.')
773 773
774 def testDisplayLineItemForEntriesWithNoCCNum(self): 774 def testDisplayLineItemForEntriesWithNoCCNum(self):
775 """Verify Autofill creates a line item for CC entries with no CC number.""" 775 """Verify Autofill creates a line item for CC entries with no CC number."""
776 driver = self.NewWebDriver() 776 driver = self.NewWebDriver()
777 self.NavigateToURL('chrome://settings/autofillEditCreditCard') 777 self.NavigateToURL('chrome://settings-frame/autofillEditCreditCard')
778 driver.find_element_by_id('name-on-card').send_keys('Jane Doe') 778 driver.find_element_by_id('name-on-card').send_keys('Jane Doe')
779 query_month = self._SelectOptionXpath('12') 779 query_month = self._SelectOptionXpath('12')
780 query_year = self._SelectOptionXpath('2014') 780 query_year = self._SelectOptionXpath('2014')
781 driver.find_element_by_id('expiration-month').find_element_by_xpath( 781 driver.find_element_by_id('expiration-month').find_element_by_xpath(
782 query_month).click() 782 query_month).click()
783 driver.find_element_by_id('expiration-year').find_element_by_xpath( 783 driver.find_element_by_id('expiration-year').find_element_by_xpath(
784 query_year).click() 784 query_year).click()
785 driver.find_element_by_id( 785 driver.find_element_by_id(
786 'autofill-edit-credit-card-apply-button').click() 786 'autofill-edit-credit-card-apply-button').click()
787 # Refresh the page to ensure the UI is up-to-date. 787 # Refresh the page to ensure the UI is up-to-date.
788 driver.refresh() 788 driver.refresh()
789 list_entry = driver.find_element_by_class_name('autofill-list-item') 789 list_entry = driver.find_element_by_class_name('autofill-list-item')
790 self.assertTrue(list_entry.is_displayed) 790 self.assertTrue(list_entry.is_displayed)
791 self.assertEqual('Jane Doe', list_entry.text, 791 self.assertEqual('Jane Doe', list_entry.text,
792 msg='Saved CC line item not same as what was entered.') 792 msg='Saved CC line item not same as what was entered.')
793 793
794 794
795 if __name__ == '__main__': 795 if __name__ == '__main__':
796 pyauto_functional.Main() 796 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | chrome/test/functional/chromeos_time.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698