<commit_before>#!/usr/bin/env bash

##
# @license Copyright 2017 The Lighthouse Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
##

# Download chrome inside of our CI env.

set -euo pipefail

# Hardcode 19 August 2021 URLs to download until
# https://github.com/GoogleChrome/lighthouse/issues/12942 is resolved.
if [ "$OSTYPE" == "msys" ]; then
  # url="https://download-chromium.appspot.com/dl/Win?type=snapshots"
  url="https://commondatastorage.googleapis.com/chromium-browser-snapshots/Win/refs_heads_main-913406/chrome-win.zip"
else
  # url="https://download-chromium.appspot.com/dl/Linux_x64?type=snapshots"
  url="https://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/refs_heads_main-913453/chrome-linux.zip"
fi

if [ -e "$CHROME_PATH" ]; then
  echo "cached chrome found"
else
  wget "$url" --no-check-certificate -q -O chrome.zip && unzip -q chrome.zip
fi<commit_msg>tests(ci): restore ToT Chromium download (#12950)<commit_after>#!/usr/bin/env bash

##
# @license Copyright 2017 The Lighthouse Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
##

# Download chrome inside of our CI env.

set -euo pipefail

if [ "$OSTYPE" == "msys" ]; then
  url="https://download-chromium.appspot.com/dl/Win?type=snapshots"
else
  url="https://download-chromium.appspot.com/dl/Linux_x64?type=snapshots"
fi

if [ -e "$CHROME_PATH" ]; then
  echo "cached chrome found"
else
  wget "$url" --no-check-certificate -q -O chrome.zip && unzip -q chrome.zip
fi
{'fraction_non_alphanumeric': 0.10541195476575121, 'fraction_numerical': 0.020193861066235864, 'mean_word_length': 4.541387024608501, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6975455', 'n_tokens_mistral': 786, 'n_tokens_neox': 720, 'n_words': 269}