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

Side by Side Diff: chrome/test/mini_installer/variable_expander.py

Issue 214823006: Move ContentBrowserTest class to content/public, since it's used by components_browsertests for bro… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: fix mac 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 | components/dom_distiller/content/DEPS » ('j') | content/child/child_thread.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 base64 5 import base64
6 import hashlib 6 import hashlib
7 import os 7 import os
8 import string 8 import string
9 import win32api 9 import win32api
10 import win32com.client 10 import win32com.client
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 chrome_update_registry_subkey = ('Software\\Google\\Update\\Clients\\' 101 chrome_update_registry_subkey = ('Software\\Google\\Update\\Clients\\'
102 '{8A69D345-D564-463c-AFF1-A69D9E530F96}') 102 '{8A69D345-D564-463c-AFF1-A69D9E530F96}')
103 chrome_html_prog_id = 'ChromeHTML' 103 chrome_html_prog_id = 'ChromeHTML'
104 elif mini_installer_product_name == 'Chromium Installer': 104 elif mini_installer_product_name == 'Chromium Installer':
105 chrome_short_name = 'Chromium' 105 chrome_short_name = 'Chromium'
106 chrome_long_name = 'Chromium' 106 chrome_long_name = 'Chromium'
107 chrome_dir = 'Chromium' 107 chrome_dir = 'Chromium'
108 chrome_update_registry_subkey = 'Software\\Chromium' 108 chrome_update_registry_subkey = 'Software\\Chromium'
109 chrome_html_prog_id = 'ChromiumHTM' 109 chrome_html_prog_id = 'ChromiumHTM'
110 else: 110 else:
111 raise KeyError("Unknown mini_installer product name '%s'" % 111 raise KeyError("Unknown mini_installer product name '%s' for %s" %
112 mini_installer_product_name) 112 (mini_installer_product_name, mini_installer_abspath))
Avi (use Gerrit) 2014/03/27 18:36:50 What's this doing in this CL?
113 113
114 self._variable_mapping = { 114 self._variable_mapping = {
115 'PROGRAM_FILES': program_files_path, 115 'PROGRAM_FILES': program_files_path,
116 'LOCAL_APPDATA': local_appdata_path, 116 'LOCAL_APPDATA': local_appdata_path,
117 'MINI_INSTALLER': mini_installer_abspath, 117 'MINI_INSTALLER': mini_installer_abspath,
118 'MINI_INSTALLER_FILE_VERSION': mini_installer_file_version, 118 'MINI_INSTALLER_FILE_VERSION': mini_installer_file_version,
119 'CHROME_SHORT_NAME': chrome_short_name, 119 'CHROME_SHORT_NAME': chrome_short_name,
120 'CHROME_LONG_NAME': chrome_long_name, 120 'CHROME_LONG_NAME': chrome_long_name,
121 'CHROME_DIR': chrome_dir, 121 'CHROME_DIR': chrome_dir,
122 'CHROME_UPDATE_REGISTRY_SUBKEY': chrome_update_registry_subkey, 122 'CHROME_UPDATE_REGISTRY_SUBKEY': chrome_update_registry_subkey,
(...skipping 16 matching lines...) Expand all
139 variables must be escaped with $$, otherwise a KeyError or a ValueError will 139 variables must be escaped with $$, otherwise a KeyError or a ValueError will
140 be raised. 140 be raised.
141 141
142 Args: 142 Args:
143 str: A string. 143 str: A string.
144 144
145 Returns: 145 Returns:
146 A new string created by replacing variables with their values. 146 A new string created by replacing variables with their values.
147 """ 147 """
148 return string.Template(str).substitute(self._variable_mapping) 148 return string.Template(str).substitute(self._variable_mapping)
OLDNEW
« no previous file with comments | « no previous file | components/dom_distiller/content/DEPS » ('j') | content/child/child_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698