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

Side by Side Diff: client/bin/site_login.py

Issue 1363002: Add session object so that we have one class that control logged in session (Closed)
Patch Set: Fix comments Created 10 years, 9 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 | client/bin/site_ui_test.py » ('j') | client/bin/site_ui_test.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS 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, os, utils, signal, time 5 import logging, os, utils, signal, time
6 from autotest_lib.client.bin import chromeos_constants, test 6 from autotest_lib.client.bin import chromeos_constants, test
7 from autotest_lib.client.common_lib import error, site_ui 7 from autotest_lib.client.common_lib import error, site_ui
8 8
9 9
10 def setup_autox(test): 10 def setup_autox(test):
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 'xscreensaver after %i seconds' % 84 'xscreensaver after %i seconds' %
85 time.time() - start_time) 85 time.time() - start_time)
86 return False 86 return False
87 87
88 return True 88 return True
89 89
90 90
91 def nuke_login_manager(): 91 def nuke_login_manager():
92 nuke_process_by_name('session_manager') 92 nuke_process_by_name('session_manager')
93 wait_for_browser() 93 wait_for_browser()
94
94 95
95 def nuke_process_by_name(name, with_prejudice=False): 96 def nuke_process_by_name(name, with_prejudice=False):
96 pid = int(utils.system_output('pgrep -o ^%s$' % name)) 97 pid = int(utils.system_output('pgrep -o ^%s$' % name))
97 if with_prejudice: 98 if with_prejudice:
98 utils.nuke_pid(pid, [signal.SIGKILL]) 99 utils.nuke_pid(pid, [signal.SIGKILL])
99 else: 100 else:
100 utils.nuke_pid(pid) 101 utils.nuke_pid(pid)
OLDNEW
« no previous file with comments | « no previous file | client/bin/site_ui_test.py » ('j') | client/bin/site_ui_test.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698