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

Unified Diff: components/test/data/password_manager/automated_tests/environment.py

Issue 1084553003: [Password manager tests automation] Adds an ability to specify test_case which should be run. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@save_only_errors
Patch Set: Rebased. Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: components/test/data/password_manager/automated_tests/environment.py
diff --git a/components/test/data/password_manager/automated_tests/environment.py b/components/test/data/password_manager/automated_tests/environment.py
index ecd1e73143301550e95c886943510d80527d466e..3ed453f4634f255269af719280a38565203b59a5 100644
--- a/components/test/data/password_manager/automated_tests/environment.py
+++ b/components/test/data/password_manager/automated_tests/environment.py
@@ -261,7 +261,7 @@ class Environment:
self._ClearDataForCheckbox("#delete-cookies-checkbox")
- def RunTestsOnSites(self, test_type):
+ def RunTestsOnSites(self, test_case_name):
"""Runs the specified test on the known websites.
Also saves the test results in the environment. Note that test types
@@ -271,7 +271,7 @@ class Environment:
on construction.
Args:
- test_type: A test identifier understood by WebsiteTest.run_test().
+ test_case_name: A test name which is a method of WebsiteTest.
vabr (Chromium) 2015/04/13 15:26:20 What do you think about requiring that the method
melandory 2015/04/14 07:22:36 I was thinking of implementing a decorator which w
vabr (Chromium) 2015/04/14 07:30:22 Acknowledged.
"""
self.DeleteCookies()
@@ -282,12 +282,12 @@ class Environment:
successful = True
error = ""
try:
- websitetest.RunTest(test_type)
+ getattr(websitetest, test_case_name)()
except Exception as e:
successful = False
error = e.message
self.tests_results.append(
- (websitetest.name, test_type, successful, error))
+ (websitetest.name, test_case_name, successful, error))
def Quit(self):
"""Shuts down the driver."""

Powered by Google App Engine
This is Rietveld 408576698