Bug 1931425 - Limit how often moz-label's #setStyles runs r=reusable-components-revie...
[gecko.git] / remote / test / puppeteer / examples / proxy.js
blobe41d0d8cd1049d91f7fb591d44d4a566660c83d5
1 /**
2 * @license
3 * Copyright 2017 Google Inc.
4 * SPDX-License-Identifier: Apache-2.0
5 */
7 'use strict';
9 const puppeteer = require('puppeteer');
11 (async () => {
12 const browser = await puppeteer.launch({
13 // Launch chromium using a proxy server on port 9876.
14 // More on proxying:
15 // https://www.chromium.org/developers/design-documents/network-settings
16 args: [
17 '--proxy-server=127.0.0.1:9876',
18 // Use proxy for localhost URLs
19 '--proxy-bypass-list=<-loopback>',
21 });
22 const page = await browser.newPage();
23 await page.goto('https://google.com');
24 await browser.close();
25 })();