Update Puppeteer to v3.0.3
DISABLE_THIRD_PARTY_CHECK=update Puppeteer
Also-By: tvanderlippe@chromium.org
Change-Id: I4ddb6a2b426bcde95f9b764790e88b560441225c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2187209
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
diff --git a/node_modules/proxy-from-env/test.js b/node_modules/proxy-from-env/test.js
index 124559d..abf6542 100644
--- a/node_modules/proxy-from-env/test.js
+++ b/node_modules/proxy-from-env/test.js
@@ -1,4 +1,4 @@
-/* jshint mocha:true */
+/* eslint max-statements:0 */
'use strict';
var assert = require('assert');
@@ -93,9 +93,8 @@
testProxyUrl(env, 'http://http-proxy', 'http://example');
testProxyUrl(env, 'http://http-proxy', parseUrl('http://example'));
- // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
+ // eslint-disable-next-line camelcase
env.http_proxy = 'http://priority';
- // jscs:enable requireCamelCaseOrUpperCaseIdentifiers
testProxyUrl(env, 'http://priority', 'http://example');
});
@@ -123,9 +122,8 @@
env.HTTPS_PROXY = 'http://https-proxy';
testProxyUrl(env, 'http://https-proxy', 'https://example');
- // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
+ // eslint-disable-next-line camelcase
env.https_proxy = 'http://priority';
- // jscs:enable requireCamelCaseOrUpperCaseIdentifiers
testProxyUrl(env, 'http://priority', 'https://example');
});
@@ -143,9 +141,8 @@
env.ALL_PROXY = 'http://catch-all';
testProxyUrl(env, 'http://catch-all', 'https://example');
- // jscs:disable requireCamelCaseOrUpperCaseIdentifiers
+ // eslint-disable-next-line camelcase
env.all_proxy = 'http://priority';
- // jscs:enable requireCamelCaseOrUpperCaseIdentifiers
testProxyUrl(env, 'http://priority', 'https://example');
});
@@ -390,4 +387,97 @@
testProxyUrl(env, '', 'http://ZzZ');
testProxyUrl(env, '', 'http://zZz');
});
+
+ describe('NPM proxy configuration', function() {
+ describe('npm_config_http_proxy should work', function() {
+ var env = {};
+ // eslint-disable-next-line camelcase
+ env.npm_config_http_proxy = 'http://http-proxy';
+
+ testProxyUrl(env, '', 'https://example');
+ testProxyUrl(env, 'http://http-proxy', 'http://example');
+
+ // eslint-disable-next-line camelcase
+ env.npm_config_http_proxy = 'http://priority';
+ testProxyUrl(env, 'http://priority', 'http://example');
+ });
+ // eslint-disable-next-line max-len
+ describe('npm_config_http_proxy should take precedence over HTTP_PROXY and npm_config_proxy', function() {
+ var env = {};
+ // eslint-disable-next-line camelcase
+ env.npm_config_http_proxy = 'http://http-proxy';
+ // eslint-disable-next-line camelcase
+ env.npm_config_proxy = 'http://unexpected-proxy';
+ env.HTTP_PROXY = 'http://unexpected-proxy';
+
+ testProxyUrl(env, 'http://http-proxy', 'http://example');
+ });
+ describe('npm_config_https_proxy should work', function() {
+ var env = {};
+ // eslint-disable-next-line camelcase
+ env.npm_config_http_proxy = 'http://unexpected.proxy';
+ testProxyUrl(env, '', 'https://example');
+
+ // eslint-disable-next-line camelcase
+ env.npm_config_https_proxy = 'http://https-proxy';
+ testProxyUrl(env, 'http://https-proxy', 'https://example');
+
+ // eslint-disable-next-line camelcase
+ env.npm_config_https_proxy = 'http://priority';
+ testProxyUrl(env, 'http://priority', 'https://example');
+ });
+ // eslint-disable-next-line max-len
+ describe('npm_config_https_proxy should take precedence over HTTPS_PROXY and npm_config_proxy', function() {
+ var env = {};
+ // eslint-disable-next-line camelcase
+ env.npm_config_https_proxy = 'http://https-proxy';
+ // eslint-disable-next-line camelcase
+ env.npm_config_proxy = 'http://unexpected-proxy';
+ env.HTTPS_PROXY = 'http://unexpected-proxy';
+
+ testProxyUrl(env, 'http://https-proxy', 'https://example');
+ });
+ describe('npm_config_proxy should work', function() {
+ var env = {};
+ // eslint-disable-next-line camelcase
+ env.npm_config_proxy = 'http://http-proxy';
+ testProxyUrl(env, 'http://http-proxy', 'http://example');
+ testProxyUrl(env, 'http://http-proxy', 'https://example');
+
+ // eslint-disable-next-line camelcase
+ env.npm_config_proxy = 'http://priority';
+ testProxyUrl(env, 'http://priority', 'http://example');
+ testProxyUrl(env, 'http://priority', 'https://example');
+ });
+ // eslint-disable-next-line max-len
+ describe('HTTP_PROXY and HTTPS_PROXY should take precedence over npm_config_proxy', function() {
+ var env = {};
+ env.HTTP_PROXY = 'http://http-proxy';
+ env.HTTPS_PROXY = 'http://https-proxy';
+ // eslint-disable-next-line camelcase
+ env.npm_config_proxy = 'http://unexpected-proxy';
+ testProxyUrl(env, 'http://http-proxy', 'http://example');
+ testProxyUrl(env, 'http://https-proxy', 'https://example');
+ });
+ describe('npm_config_no_proxy should work', function() {
+ var env = {};
+ env.HTTP_PROXY = 'http://proxy';
+ // eslint-disable-next-line camelcase
+ env.npm_config_no_proxy = 'example';
+
+ testProxyUrl(env, '', 'http://example');
+ testProxyUrl(env, 'http://proxy', 'http://otherwebsite');
+ });
+ // eslint-disable-next-line max-len
+ describe('npm_config_no_proxy should take precedence over NO_PROXY', function() {
+ var env = {};
+ env.HTTP_PROXY = 'http://proxy';
+ env.NO_PROXY = 'otherwebsite';
+ // eslint-disable-next-line camelcase
+ env.npm_config_no_proxy = 'example';
+
+ testProxyUrl(env, '', 'http://example');
+ testProxyUrl(env, 'http://proxy', 'http://otherwebsite');
+ });
+ });
});