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

Side by Side Diff: chrome/test/pyautolib/chromoting_helper.py

Issue 186763004: Add breakpad support for me2me and it2me native messaging host on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename CFBundleIdentifier of the NM hosts Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/branding_Chrome » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Chromoting helper to install/uninstall host and replace pref pane.""" 5 """Chromoting helper to install/uninstall host and replace pref pane."""
6 6
7 import abc 7 import abc
8 import os 8 import os
9 import shutil 9 import shutil
10 import sys 10 import sys
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 subprocess.call([uninstall_app, '--no-ui']) 117 subprocess.call([uninstall_app, '--no-ui'])
118 118
119 def ReplacePrefPaneMac(self, operation): 119 def ReplacePrefPaneMac(self, operation):
120 """Constructs mock pref pane to replace the actual pref pane on Mac.""" 120 """Constructs mock pref pane to replace the actual pref pane on Mac."""
121 assert os.geteuid() == 0, 'Need superuser privileges' 121 assert os.geteuid() == 0, 'Need superuser privileges'
122 122
123 pref_pane_dir = os.path.join('/Library', 'PreferencePanes') 123 pref_pane_dir = os.path.join('/Library', 'PreferencePanes')
124 124
125 mock_pref_pane = os.path.join(pref_pane_dir, 'mock_pref_pane') 125 mock_pref_pane = os.path.join(pref_pane_dir, 'mock_pref_pane')
126 pref_pane = os.path.join(pref_pane_dir, 126 pref_pane = os.path.join(pref_pane_dir,
127 'org.chromium.chromoting.prefPane') 127 'ChromeRemoteDesktop.prefPane')
Sergey Ulanov 2014/03/25 07:48:45 pyauto tests are on death row - is it worth updati
128 mock_pref_pane_python = os.path.join( 128 mock_pref_pane_python = os.path.join(
129 os.path.dirname(os.path.abspath(__file__)), 129 os.path.dirname(os.path.abspath(__file__)),
130 'mock_pref_pane.py') 130 'mock_pref_pane.py')
131 131
132 # When the symlink from real pref pane to mock pref pane exists, 132 # When the symlink from real pref pane to mock pref pane exists,
133 # mock pref pane will be modified to be a dir when the host is installed. 133 # mock pref pane will be modified to be a dir when the host is installed.
134 # After the host is installed and mock pref pane is modified to be a file, 134 # After the host is installed and mock pref pane is modified to be a file,
135 # it will be a file until next host installation. 135 # it will be a file until next host installation.
136 if os.path.isdir(mock_pref_pane): 136 if os.path.isdir(mock_pref_pane):
137 shutil.rmtree(mock_pref_pane, True) 137 shutil.rmtree(mock_pref_pane, True)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 elif sys.argv[1] in ['enable', 'disable', 'changepin']: 190 elif sys.argv[1] in ['enable', 'disable', 'changepin']:
191 assert sys.platform.startswith('darwin'), \ 191 assert sys.platform.startswith('darwin'), \
192 'Replacing pref pane is Mac specific' 192 'Replacing pref pane is Mac specific'
193 helper.ReplacePrefPaneMac(sys.argv[1]) 193 helper.ReplacePrefPaneMac(sys.argv[1])
194 else: 194 else:
195 print >>sys.stderr, 'Invalid syntax' 195 print >>sys.stderr, 'Invalid syntax'
196 return 1 196 return 1
197 197
198 198
199 if __name__ == '__main__': 199 if __name__ == '__main__':
200 Main() 200 Main()
OLDNEW
« no previous file with comments | « no previous file | remoting/branding_Chrome » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698