Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
For when you need to test your site in Google Search (Chrome 41).
/**
* Copyright 2018 Google Inc. 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.
*
* @author ebidel@ (Eric Bidelman)
*/
const puppeteer = require('puppeteer');
const LAST_CHROME41_REVISION = '310958';
(async() => {
const browserFetcher = puppeteer.createBrowserFetcher();
const canDownload = await browserFetcher.canDownload(LAST_CHROME41_REVISION);
console.assert(canDownload, `Cannot download Chrome 41 ${LAST_CHROME41_REVISION}`);
const revisionInfo = await browserFetcher.download(LAST_CHROME41_REVISION, (bytes, total) => {
console.log(`Downloaded ${bytes/total * 100}%`);
});
console.log('Local downloaded chromium revisions:', await browserFetcher.localRevisions());
console.log('Run it with:');
console.log(`${revisionInfo.executablePath} --user-data-dir=./chrome41profile`);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.