From c2e3c4eb504552bc6c3085380120ebe77ea700a3 Mon Sep 17 00:00:00 2001 From: Andrey Goncharov Date: Mon, 20 Jun 2022 12:18:40 -0700 Subject: [PATCH] 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 --- .../src/devices/TestDevice.tsx | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 desktop/flipper-frontend-core/src/devices/TestDevice.tsx diff --git a/desktop/flipper-frontend-core/src/devices/TestDevice.tsx b/desktop/flipper-frontend-core/src/devices/TestDevice.tsx new file mode 100644 index 000000000..dbe4af157 --- /dev/null +++ b/desktop/flipper-frontend-core/src/devices/TestDevice.tsx @@ -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 + } +}