https://github.com/angular/angular
Raw File
Tip revision: d315e2c4fa178dfbd41bc25259605bb999fa302e authored by Andrew Scott on 21 December 2023, 14:30:39 UTC
release: cut the v17.1.0-next.5 release
Tip revision: d315e2c
ipc-messages.ts
/**
 * @license
 * Copyright Google LLC All Rights Reserved.
 *
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://angular.io/license
 */

/** Message that can be sent to the daemon to start a given test. */
export class StartTestMessage {
  readonly type = 'start-test';
  constructor(public url: string, public browserId: string, public testDescription: string) {}
}

/** Message that can be sent to the daemon if a test completed. */
export class EndTestMessage {
  readonly type = 'end-test';
}

/** Message being sent from the daemon if a request browser is not available. */
export class NoAvailableBrowserMessage {
  readonly type = 'browser-not-ready';
}

/** Message that indicates an internal error in background service. */
export class InternalErrorMessage {
  readonly type = 'internal-error';
  constructor(public msg: string) {}
}

/** Type of messages the background service can receive. */
export type BackgroundServiceReceiveMessages = StartTestMessage|EndTestMessage;

/** Type of messages the background services can send to clients. */
export type BackgroundServiceSendMessages = NoAvailableBrowserMessage|InternalErrorMessage;
back to top