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

Side by Side Diff: components/test/data/password_manager/environment.py

Issue 386423002: Allow the test bots to easily run the password manager python tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | components/test/data/password_manager/run_tests.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 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 """The testing Environment class.""" 5 """The testing Environment class."""
6 6
7 import logging 7 import logging
8 import shutil 8 import shutil
9 import sys
9 import time 10 import time
10 import traceback 11 import traceback
11 from xml.etree import ElementTree 12 from xml.etree import ElementTree
12 from xml.sax.saxutils import escape 13 from xml.sax.saxutils import escape
13 14
15 sys.path.insert(0, '../../../../third_party/webdriver/pylib/')
16
14 from selenium import webdriver 17 from selenium import webdriver
15 from selenium.common.exceptions import NoSuchElementException 18 from selenium.common.exceptions import NoSuchElementException
16 from selenium.common.exceptions import WebDriverException 19 from selenium.common.exceptions import WebDriverException
17 from selenium.webdriver.chrome.options import Options 20 from selenium.webdriver.chrome.options import Options
18 21
19 22
20 # Message strings to look for in chrome://password-manager-internals 23 # Message strings to look for in chrome://password-manager-internals
21 MESSAGE_ASK = "Message: Decision: ASK the user" 24 MESSAGE_ASK = "Message: Decision: ASK the user"
22 MESSAGE_SAVE = "Message: Decision: SAVE the password" 25 MESSAGE_SAVE = "Message: Decision: SAVE the password"
23 26
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 except Exception: 387 except Exception:
385 successful = False 388 successful = False
386 error = traceback.format_exc() 389 error = traceback.format_exc()
387 self.tests_results.append(TestResult(websitetest.name, "prompt", 390 self.tests_results.append(TestResult(websitetest.name, "prompt",
388 successful, escape(error))) 391 successful, escape(error)))
389 392
390 def Quit(self): 393 def Quit(self):
391 """Closes the tests.""" 394 """Closes the tests."""
392 # Close the webdriver. 395 # Close the webdriver.
393 self.driver.quit() 396 self.driver.quit()
OLDNEW
« no previous file with comments | « no previous file | components/test/data/password_manager/run_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698