Add TestDeivce to flipper-frontend-core

Summary: This stack attempts to start using flipper-frontend-core from flipper-ui-core. Currently, flipper-frontend-core contains lots of copy-pasted code from flipper-ui-core.

Reviewed By: passy

Differential Revision: D37139129

fbshipit-source-id: 53ba08920735d1b40e1351fddf41a97a6352b2b6
This commit is contained in:
Andrey Goncharov
2022-06-20 12:18:40 -07:00
committed by Facebook GitHub Bot
parent 99938e71ce
commit c2e3c4eb50

View File

@@ -0,0 +1,39 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import type {DeviceOS, DeviceType} from 'flipper-plugin';
import {DeviceSpec} from 'flipper-common';
import BaseDevice from './BaseDevice';
import {getRenderHostInstance} from '../RenderHost';
export class TestDevice extends BaseDevice {
constructor(
serial: string,
deviceType: DeviceType,
title: string,
os: DeviceOS,
specs?: DeviceSpec[],
) {
super(getRenderHostInstance().flipperServer, {
serial,
deviceType,
title,
os,
specs,
features: {
screenCaptureAvailable: false,
screenshotAvailable: false,
},
});
}
async startLogging() {
// noop
}
}