mirror of
https://github.com/imputnet/helium.git
synced 2026-08-20 00:57:32 +02:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c6feb7e095 | |||
| 03a16cfa23 | |||
| d447f8892d | |||
| 8f30897faa | |||
| 1772f7ce56 | |||
| 7019790c7a | |||
| b65ab87b27 | |||
| 1ff4e281e6 | |||
| b71fd25a0a | |||
| 53235ce907 | |||
| 3c92902a6c | |||
| d0a8c29d38 | |||
| 2a53b77d33 |
@@ -69,7 +69,17 @@ runs:
|
||||
|
||||
mkdir -p build/{src,download_cache}
|
||||
|
||||
for file in "$HELIUM_DIR/downloads.ini" "$HELIUM_DIR/deps.ini" "$PLATFORM_DIR/downloads.ini"; do
|
||||
if ! run_upstream utils/downloads.py retrieve \
|
||||
-i "$HELIUM_DIR/downloads.ini" -c build/download_cache; then
|
||||
run_upstream utils/clone.py -o build/src
|
||||
fi
|
||||
|
||||
if [ ! -d build/src/chrome ]; then
|
||||
run_upstream utils/downloads.py unpack \
|
||||
-i "$HELIUM_DIR/downloads.ini" -c build/download_cache build/src
|
||||
fi
|
||||
|
||||
for file in "$HELIUM_DIR/deps.ini" "$PLATFORM_DIR/downloads.ini"; do
|
||||
if ! [ -f "$file" ]; then continue; fi
|
||||
|
||||
run_upstream utils/downloads.py retrieve \
|
||||
|
||||
@@ -1 +1 @@
|
||||
149.0.7827.155
|
||||
149.0.7827.200
|
||||
|
||||
@@ -31,7 +31,7 @@ def check_downloads_ini(downloads_ini_iter):
|
||||
|
||||
downloads_ini_iter must be an iterable of strings to downloads.ini files.
|
||||
|
||||
Returns True if errors occured, False otherwise.
|
||||
Returns True if errors occurred, False otherwise.
|
||||
"""
|
||||
try:
|
||||
DownloadInfo(downloads_ini_iter)
|
||||
|
||||
@@ -52,7 +52,7 @@ def check_patch_readability(patches_dir, series_path=Path('series')):
|
||||
Check if the patches from iterable patch_path_iter are readable.
|
||||
Patches that are not are logged to stdout.
|
||||
|
||||
Returns True if warnings occured, False otherwise.
|
||||
Returns True if warnings occurred, False otherwise.
|
||||
"""
|
||||
warnings = False
|
||||
for patch_path in _read_series_file(patches_dir, series_path, join_dir=True):
|
||||
|
||||
@@ -39,7 +39,7 @@ try:
|
||||
import urllib3.util
|
||||
|
||||
class _VerboseRetry(urllib3.util.Retry):
|
||||
"""A more verbose version of HTTP Adatper about retries"""
|
||||
"""A more verbose version of HTTP Adapter about retries"""
|
||||
|
||||
def sleep_for_retry(self, response=None):
|
||||
"""Sleeps for Retry-After, and logs the sleep time"""
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
fonts(\\*?)\.googleapis(\\*?)\.com#f0ntz\g<1>.9oo91e8p1\g<2>.qjz9zk
|
||||
google([A-Za-z\-]*?\\*?)\.com(?!mon)#9oo91e\g<1>.qjz9zk
|
||||
(?<![A-Za-z0-9.*-])(\.?(?!support\.google\.com(?![A-Za-z0-9.-]))(?:[A-Za-z0-9*-]+\.)*[A-Za-z0-9*-]*?)google([A-Za-z\-]*?\\*?)\.com(?!mon)#\g<1>9oo91e\g<2>.qjz9zk
|
||||
gstatic([A-Za-z\-]*?\\*?)\.com#95tat1c\g<1>.qjz9zk
|
||||
chrome([A-Za-z\-]*?\\*?)\.com(?!ponent)#ch40me\g<1>.qjz9zk
|
||||
(?<![A-Za-z0-9.*-])(\.?(?!(?:developer\.chrome\.com|(?:www\.)?chromestatus\.com)(?![A-Za-z0-9.-]))(?:[A-Za-z0-9*-]+\.)*[A-Za-z0-9*-]*?)chrome([A-Za-z\-]*?\\*?)\.com(?!ponent)#\g<1>ch40me\g<2>.qjz9zk
|
||||
chromium(?!app)([A-Za-z\-]*?\\*?)\.org#ch40m1um\g<1>.qjz9zk
|
||||
mozilla([A-Za-z\-]*?\\*?)\.org#m0z111a\g<1>.qjz9zk
|
||||
facebook([A-Za-z\-]*?\\*?)\.com#f8c3b00k\g<1>.qjz9zk
|
||||
|
||||
+1
-322
File diff suppressed because it is too large
Load Diff
@@ -958,7 +958,7 @@
|
||||
}
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -3299,6 +3299,11 @@ class CONTENT_EXPORT ContentBrowserClien
|
||||
@@ -3300,6 +3300,11 @@ class CONTENT_EXPORT ContentBrowserClien
|
||||
GetClipboardTypesIfPolicyApplied(
|
||||
const ui::ClipboardSequenceNumberToken& seqno);
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
4
|
||||
6
|
||||
|
||||
+2
-2
@@ -110,7 +110,7 @@ def clone(args): # pylint: disable=too-many-branches, too-many-locals, too-many-
|
||||
check=True,
|
||||
universal_newlines=True)
|
||||
|
||||
# Manualy set up the gsutil directory for newer versions of Python
|
||||
# Manually set up the gsutil directory for newer versions of Python
|
||||
get_logger().info('Cloning gsutil')
|
||||
if not gsupath.exists():
|
||||
gsupath.mkdir(parents=True)
|
||||
@@ -226,7 +226,7 @@ def clone(args): # pylint: disable=too-many-branches, too-many-locals, too-many-
|
||||
move(str(gnpath / 'out' / 'last_commit_position.h'),
|
||||
str(args.output / 'tools' / 'gn' / 'bootstrap'))
|
||||
|
||||
get_logger().info('Removing uneeded files')
|
||||
get_logger().info('Removing unneeded files')
|
||||
for path in sorted(args.output.rglob('*'), key=lambda l: len(str(l)), reverse=True):
|
||||
if not path.is_symlink() and '.git' not in path.parts:
|
||||
if path.is_file() and (('out' in path.parts and 'node_modules' not in path.parts)
|
||||
|
||||
@@ -223,7 +223,7 @@ def apply_substitution(regex_path, files_path, source_tree, domainsub_cache):
|
||||
f'the file index hash delimiter "{_INDEX_HASH_DELIMITER}"')
|
||||
path = resolved_tree / relative_path
|
||||
if not path.exists():
|
||||
get_logger().warning('Skipping non-existant path: %s', path)
|
||||
get_logger().warning('Skipping non-existent path: %s', path)
|
||||
continue
|
||||
if path.is_symlink():
|
||||
get_logger().warning('Skipping path that has become a symlink: %s', path)
|
||||
|
||||
@@ -34,3 +34,66 @@ def test_update_timestamp():
|
||||
new_stats: os.stat_result = path.stat()
|
||||
assert orig_stats.st_atime_ns == new_stats.st_atime_ns
|
||||
assert orig_stats.st_mtime_ns == new_stats.st_mtime_ns
|
||||
|
||||
|
||||
def test_substitute_path_preserves_docs_and_help_hosts():
|
||||
regex_iter = domain_substitution.DomainRegexList(
|
||||
Path(__file__).parents[2] / 'domain_regex.list').regex_pairs
|
||||
content = '\n'.join((
|
||||
'https://developer.chrome.com/docs/extensions',
|
||||
'https://support.google.com/chrome?p=embedded_content',
|
||||
'https://chromestatus.com/feature/123',
|
||||
'https://www.chromestatus.com/feature/456',
|
||||
'https://accounts.google.com/signin',
|
||||
'https://chromewebstore.google.com/detail/example',
|
||||
'https://foo.developer.chrome.com/subdomain',
|
||||
'https://developer.chrome.com.evil.example/',
|
||||
'https://cruxvis.withgoogle.com/',
|
||||
'https://managedchrome.com/',
|
||||
'domain=.google.com',
|
||||
'domain=.support.google.com',
|
||||
))
|
||||
|
||||
with tempfile.TemporaryDirectory() as tmpdirname:
|
||||
path = Path(tmpdirname, 'domains.txt')
|
||||
path.write_text(content, encoding='UTF-8')
|
||||
|
||||
crc32_hash, orig_content = domain_substitution._substitute_path(path, regex_iter)
|
||||
|
||||
assert crc32_hash is not None
|
||||
assert orig_content == content.encode('UTF-8')
|
||||
assert path.read_text(encoding='UTF-8') == '\n'.join((
|
||||
'https://developer.chrome.com/docs/extensions',
|
||||
'https://support.google.com/chrome?p=embedded_content',
|
||||
'https://chromestatus.com/feature/123',
|
||||
'https://www.chromestatus.com/feature/456',
|
||||
'https://accounts.9oo91e.qjz9zk/signin',
|
||||
'https://chromewebstore.9oo91e.qjz9zk/detail/example',
|
||||
'https://foo.developer.ch40me.qjz9zk/subdomain',
|
||||
'https://developer.ch40me.qjz9zk.evil.example/',
|
||||
'https://cruxvis.with9oo91e.qjz9zk/',
|
||||
'https://managedch40me.qjz9zk/',
|
||||
'domain=.9oo91e.qjz9zk',
|
||||
'domain=.support.google.com',
|
||||
))
|
||||
|
||||
|
||||
def test_substitute_path_skips_cache_when_only_preserved_hosts_match():
|
||||
regex_iter = domain_substitution.DomainRegexList(
|
||||
Path(__file__).parents[2] / 'domain_regex.list').regex_pairs
|
||||
content = '\n'.join((
|
||||
'https://developer.chrome.com',
|
||||
'https://support.google.com',
|
||||
'https://chromestatus.com',
|
||||
'https://www.chromestatus.com',
|
||||
))
|
||||
|
||||
with tempfile.TemporaryDirectory() as tmpdirname:
|
||||
path = Path(tmpdirname, 'domains.txt')
|
||||
path.write_text(content, encoding='UTF-8')
|
||||
|
||||
crc32_hash, orig_content = domain_substitution._substitute_path(path, regex_iter)
|
||||
|
||||
assert crc32_hash is None
|
||||
assert orig_content is None
|
||||
assert path.read_text(encoding='UTF-8') == content
|
||||
|
||||
@@ -20,7 +20,7 @@ def test_find_and_check_patch():
|
||||
patches.find_and_check_patch(patch_bin_path=Path('/this/should/not/exist'))
|
||||
|
||||
with pytest.raises(RuntimeError):
|
||||
# Use comamnd "false" to return non-zero exit code
|
||||
# Use command "false" to return non-zero exit code
|
||||
patches.find_and_check_patch(patch_bin_path=Path('/bin/false'))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user