Commit 2dbfd72d authored by rchtara's avatar rchtara Committed by Commit bot

Never run the password manager python tests in the password

internals page tab
This CL fixes that issue by always making sure that at the end
of each test, the current tab is changed from the password
internal page to the test page even if an exception is thrown.

BUG=413273

Review URL: https://codereview.chromium.org/562013003

Cr-Commit-Position: refs/heads/master@{#294831}
parent 1894ec5f
......@@ -303,6 +303,7 @@ class WebsiteTest:
not like we expected or if the password is saved.
"""
logging.info("\nWrong Login Test for %s \n" % self.name)
try:
correct_password = self.password
self.password = self.password + "1"
self.LoginWhenNotAutofilled()
......@@ -314,6 +315,7 @@ class WebsiteTest:
False,
"Error: password manager thinks that a login with wrong password was "
"successful for the following website : %s \n" % self.name)
finally:
self.environment.SwitchFromInternals()
def SuccessfulLoginTest(self):
......@@ -329,6 +331,7 @@ class WebsiteTest:
saved.
"""
logging.info("\nSuccessful Login Test for %s \n" % self.name)
try:
self.LoginWhenNotAutofilled()
self.Wait(2)
self.environment.SwitchToInternals()
......@@ -338,6 +341,7 @@ class WebsiteTest:
"Error: password manager hasn't detected a successful login for the "
"following website : %s \n"
% self.name)
finally:
self.environment.SwitchFromInternals()
self.Logout()
......@@ -355,6 +359,7 @@ class WebsiteTest:
"""
logging.info("\nSuccessful Login With Autofilled Password"
" Test %s \n" % self.name)
try:
self.LoginWhenAutofilled()
self.Wait(2)
self.environment.SwitchToInternals()
......@@ -364,6 +369,7 @@ class WebsiteTest:
"Error: password manager hasn't detected a successful login for the "
"following website : %s \n"
% self.name)
finally:
self.environment.SwitchFromInternals()
self.Logout()
......@@ -380,6 +386,7 @@ class WebsiteTest:
password or is shown for a wrong one.
"""
logging.info("\nPrompt Test for %s \n" % self.name)
try:
correct_password = self.password
self.password = self.password + "1"
self.LoginWhenNotAutofilled()
......@@ -401,4 +408,5 @@ class WebsiteTest:
True,
"Error: password manager hasn't detected a successful login for the "
"following website : %s \n" % self.name)
finally:
self.environment.SwitchFromInternals()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment