Index: chrome/test/functional/passwords.py |
=================================================================== |
--- chrome/test/functional/passwords.py (revision 138347) |
+++ chrome/test/functional/passwords.py (working copy) |
@@ -4,7 +4,6 @@ |
# found in the LICENSE file. |
import os |
-from urlparse import urlparse |
import pyauto_functional # Must be imported before pyauto |
import pyauto |
@@ -19,11 +18,6 @@ |
URL = 'https://accounts.google.com/ServiceLogin' |
URL_HTTPS = 'https://accounts.google.com/Login' |
URL_LOGOUT = 'https://accounts.google.com/Logout' |
- HOSTNAME = 'https://' + urlparse(URL).netloc |
- USERNAME_ELEM = 'Email' |
- PASSWORD_ELEM = 'Passwd' |
- USERNAME = 'test@google.com' |
- PASSWORD = 'test.password' |
def Debug(self): |
"""Test method for experimentation. |
@@ -86,9 +80,9 @@ |
window.domAutomationController.send(value); |
""" |
self.assertTrue(self.WaitUntil( |
- lambda: self.ExecuteJavascript(js_template % self.USERNAME_ELEM, |
+ lambda: self.ExecuteJavascript(js_template % 'Email', |
tab_index, window_index) != '' and |
- self.ExecuteJavascript(js_template % self.PASSWORD_ELEM, |
+ self.ExecuteJavascript(js_template % 'Passwd', |
tab_index, window_index) != '')) |
def testSavePassword(self): |
@@ -222,23 +216,23 @@ |
Saved passwords should be autofilled once the username is entered in |
incognito mode. |
""" |
- action_target = self.HOSTNAME |
- |
driver = self.NewWebDriver() |
+ username = 'test@google.com' |
+ password = 'test.password' |
password_dict = self._ConstructPasswordDictionary( |
- self.USERNAME, self.PASSWORD, self.HOSTNAME, self.URL, |
- self.USERNAME_ELEM, self.PASSWORD_ELEM, action_target) |
+ username, password, |
+ 'https://www.google.com/', 'https://www.google.com/accounts', |
+ 'Email', 'Passwd', 'https://www.google.com/accounts') |
self.AddSavedPassword(password_dict) |
self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW) |
self.NavigateToURL(self.URL, 1, 0) |
# Switch to window 1. |
driver.switch_to_window(driver.window_handles[1]) |
- driver.find_element_by_id( |
- self.USERNAME_ELEM).send_keys(self.USERNAME + '\t') |
+ driver.find_element_by_id('Email').send_keys(username + '\t') |
incognito_passwd = self.GetDOMValue( |
'document.getElementById("Passwd").value', tab_index=0, windex=1) |
- self.assertEqual(incognito_passwd, self.PASSWORD, |
- msg='Password creds did not autofill in incognito mode.') |
+ self.assertEqual(incognito_passwd, password, |
+ msg='Password creds did not autofill in incognito mode.') |
def testInfoBarDisappearByNavigatingPage(self): |
"""Test password infobar is dismissed when navigating to different page.""" |
@@ -275,8 +269,8 @@ |
If the password field has autocomplete turned off, then the password infobar |
should not offer to save the password info. |
""" |
- password_info = {'Email': self.USERNAME, |
- 'Passwd': self.PASSWORD} |
+ password_info = {'Email': 'test@google.com', |
+ 'Passwd': 'test12345'} |
# Disable one-click login infobar for sync. |
self.SetPrefs(pyauto.kReverseAutologinEnabled, False) |
Property changes on: chrome/test/functional/passwords.py |
___________________________________________________________________ |
Deleted: svn:mergeinfo |