-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move mock environment to test/stager scene
- Loading branch information
Showing
5 changed files
with
133 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
packages/devtools_app/test/test_infra/scenes/standalone_ui/vs_code.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright 2022 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be found | ||
// in the LICENSE file. | ||
|
||
import 'package:devtools_app/devtools_app.dart'; | ||
import 'package:devtools_app/src/shared/feature_flags.dart'; | ||
import 'package:devtools_app/src/standalone_ui/vs_code/flutter_panel.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:stager/stager.dart'; | ||
|
||
import '../../test_data/dart_tooling_api/mock_api.dart'; | ||
import 'vs_code_mock_editor.dart'; | ||
|
||
final _api = MockDartToolingApi(); | ||
|
||
/// To run, use the "standalone_ui/vs_code" launch configuration with the | ||
/// `devtools/packages/` folder open in VS Code, or run: | ||
/// | ||
/// flutter run -t test/test_infra/scenes/standalone_ui/vs_code.stager_app.g.dart --dart-define=enable_experiments=true -d chrome | ||
class VsCodeScene extends Scene { | ||
late PerformanceController controller; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return VsCodeFlutterPanelMockEditor( | ||
api: _api, | ||
child: VsCodeFlutterPanel(_api), | ||
); | ||
} | ||
|
||
@override | ||
String get title => '$VsCodeScene'; | ||
|
||
@override | ||
Future<void> setUp() async { | ||
FeatureFlags.vsCodeSidebarTooling = true; | ||
|
||
setGlobal(IdeTheme, IdeTheme()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters