Push breakpoint URIs to Project and remove unused string paths (#23395)
This commit is contained in:
@@ -33,13 +33,13 @@ void main() {
|
||||
|
||||
Future<VMIsolate> breakInBuildMethod(FlutterTestDriver flutter) async {
|
||||
return _flutter.breakAt(
|
||||
Uri.parse('package:test/main.dart'),
|
||||
_project.buildMethodBreakpointUri,
|
||||
_project.buildMethodBreakpointLine);
|
||||
}
|
||||
|
||||
Future<VMIsolate> breakInTopLevelFunction(FlutterTestDriver flutter) async {
|
||||
return _flutter.breakAt(
|
||||
Uri.parse('package:test/main.dart'),
|
||||
_project.topLevelFunctionBreakpointUri,
|
||||
_project.topLevelFunctionBreakpointLine);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ void main() {
|
||||
test('reload hits breakpoints after reload', () async {
|
||||
await _flutter.run(withDebugger: true);
|
||||
final VMIsolate isolate = await _flutter.breakAt(
|
||||
Uri.parse('package:test/main.dart'),
|
||||
_project.breakpointUri,
|
||||
_project.breakpointLine);
|
||||
expect(isolate.pauseEvent, isInstanceOf<VMPauseBreakpointEvent>());
|
||||
});
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_tools/src/base/file_system.dart';
|
||||
|
||||
import 'test_project.dart';
|
||||
|
||||
class BasicProject extends TestProject {
|
||||
@@ -41,9 +39,9 @@ class BasicProject extends TestProject {
|
||||
}
|
||||
''';
|
||||
|
||||
String get buildMethodBreakpointFile => breakpointFile;
|
||||
Uri get buildMethodBreakpointUri => breakpointUri;
|
||||
int get buildMethodBreakpointLine => breakpointLine;
|
||||
|
||||
String get topLevelFunctionBreakpointFile => fs.path.join(dir.path, 'lib', 'main.dart');
|
||||
Uri get topLevelFunctionBreakpointUri => breakpointUri;
|
||||
int get topLevelFunctionBreakpointLine => lineContaining(main, '// TOP LEVEL BREAKPOINT');
|
||||
}
|
||||
|
||||
@@ -16,8 +16,7 @@ abstract class TestProject {
|
||||
String get main;
|
||||
|
||||
// Valid locations for a breakpoint for tests that just need to break somewhere.
|
||||
String get breakpointFile => fs.path.join(
|
||||
dir.path, 'lib', 'main.dart');
|
||||
Uri get breakpointUri => Uri.parse('package:test/main.dart');
|
||||
int get breakpointLine => lineContaining(main, '// BREAKPOINT');
|
||||
|
||||
Future<void> setUpIn(Directory dir) async {
|
||||
|
||||
Reference in New Issue
Block a user