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

Side by Side Diff: tools/telemetry/telemetry/internal/backends/chrome/cros_unittest.py

Issue 1428133005: [Telemetry] Allows concatenating multiple Disabled & Enabled decorators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Dave's comment Created 5 years, 1 month 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
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 import logging 5 import logging
6 import urllib2 6 import urllib2
7 import os 7 import os
8 8
9 from telemetry.core import exceptions 9 from telemetry.core import exceptions
10 from telemetry.core import util 10 from telemetry.core import util
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 if self._is_guest: 58 if self._is_guest:
59 return 59 return
60 with self._CreateBrowser(autotest_ext=True) as b: 60 with self._CreateBrowser(autotest_ext=True) as b:
61 extension = self._GetAutotestExtension(b) 61 extension = self._GetAutotestExtension(b)
62 try: 62 try:
63 extension.ExecuteJavaScript('chrome.autotestPrivate.logout();') 63 extension.ExecuteJavaScript('chrome.autotestPrivate.logout();')
64 except exceptions.Error: 64 except exceptions.Error:
65 pass 65 pass
66 util.WaitFor(lambda: not self._IsCryptohomeMounted(), 20) 66 util.WaitFor(lambda: not self._IsCryptohomeMounted(), 20)
67 67
68 @decorators.Disabled 68 @decorators.Disabled('all')
69 def testGaiaLogin(self): 69 def testGaiaLogin(self):
70 """Tests gaia login. Credentials are expected to be found in a 70 """Tests gaia login. Credentials are expected to be found in a
71 credentials.txt file, with a single line of format username:password.""" 71 credentials.txt file, with a single line of format username:password."""
72 if self._is_guest: 72 if self._is_guest:
73 return 73 return
74 username = 'powerloadtest@gmail.com' 74 username = 'powerloadtest@gmail.com'
75 password = urllib2.urlopen( 75 password = urllib2.urlopen(
76 'https://sites.google.com/a/chromium.org/dev/chromium-os/testing/' 76 'https://sites.google.com/a/chromium.org/dev/chromium-os/testing/'
77 'power-testing/pltp/pltp').read().rstrip() 77 'power-testing/pltp/pltp').read().rstrip()
78 with self._CreateBrowser(gaia_login=True, 78 with self._CreateBrowser(gaia_login=True,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 self.assertTrue(self._IsScreenLocked(browser)) 145 self.assertTrue(self._IsScreenLocked(browser))
146 146
147 def _UnlockScreen(self, browser): 147 def _UnlockScreen(self, browser):
148 logging.info('Unlocking') 148 logging.info('Unlocking')
149 browser.oobe.ExecuteJavaScript(''' 149 browser.oobe.ExecuteJavaScript('''
150 Oobe.authenticateForTesting('%s', '%s'); 150 Oobe.authenticateForTesting('%s', '%s');
151 ''' % (self._username, self._password)) 151 ''' % (self._username, self._password))
152 util.WaitFor(lambda: not browser.oobe_exists, 10) 152 util.WaitFor(lambda: not browser.oobe_exists, 10)
153 self.assertFalse(self._IsScreenLocked(browser)) 153 self.assertFalse(self._IsScreenLocked(browser))
154 154
155 @decorators.Disabled 155 @decorators.Disabled('all')
156 def testScreenLock(self): 156 def testScreenLock(self):
157 """Tests autotestPrivate.screenLock""" 157 """Tests autotestPrivate.screenLock"""
158 if self._is_guest: 158 if self._is_guest:
159 return 159 return
160 with self._CreateBrowser(autotest_ext=True) as browser: 160 with self._CreateBrowser(autotest_ext=True) as browser:
161 self._LockScreen(browser) 161 self._LockScreen(browser)
162 self._AttemptUnlockBadPassword(browser) 162 self._AttemptUnlockBadPassword(browser)
163 self._UnlockScreen(browser) 163 self._UnlockScreen(browser)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698