Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/remote/test/puppeteer/test/src/cdp/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  pipe.spec.ts   Sprache: JAVA

 

/**
 * @license
 * Copyright 2019 Google Inc.
 * SPDX-License-Identifier: Apache-2.0
 */

import expect from 'expect';
import {Deferred} from 'puppeteer-core/internal/util/Deferred.js';

import {getTestState, launch} from '../mocha-utils.js';
import {waitEvent} from '../utils.js';

describe('Puppeteer.launch', function () {
  it('should support the pipe option', async () => {
    const {browser, close} = await launch({pipe: true});
    try {
      expect(await browser.pages()).toHaveLength(1);
      expect(browser.wsEndpoint()).toBe('');
      const page = await browser.newPage();
      expect(await page.evaluate('11 * 11')).toBe(121);
      await page.close();
    } finally {
      await close();
    }
  });
  it('should support the pipe argument', async () => {
    const {defaultBrowserOptions} = await getTestState({skipLaunch: true});
    const options = Object.assign({}, defaultBrowserOptions);
    options.args = ['--remote-debugging-pipe'].concat(options.args || []);
    const {browser, close} = await launch(options);
    try {
      expect(browser.wsEndpoint()).toBe('');
      const page = await browser.newPage();
      expect(await page.evaluate('11 * 11')).toBe(121);
      await page.close();
    } finally {
      await close();
    }
  });
  it('should fire "disconnected" when closing with pipe', async function () {
    const {browser, close} = await launch({pipe: true});
    try {
      const disconnectedEventPromise = waitEvent(browser, 'disconnected');
      // Emulate user exiting browser.
      browser.process()!.kill();
      await Deferred.race([
        disconnectedEventPromise,
        Deferred.create({
          message: `Failed in after Hook`,
          timeout: this.timeout() - 1000,
        }),
      ]);
    } finally {
      await close();
    }
  });
});

Messung V0.5 in Prozent
C=95 H=100 G=97

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-10-11) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.