Unverified Commit 64bf567b authored by Danny Tuppeny's avatar Danny Tuppeny Committed by GitHub

Push breakpoint URIs to Project and remove unused string paths (#23395)

parent aa83f77a
...@@ -33,13 +33,13 @@ void main() { ...@@ -33,13 +33,13 @@ void main() {
Future<VMIsolate> breakInBuildMethod(FlutterTestDriver flutter) async { Future<VMIsolate> breakInBuildMethod(FlutterTestDriver flutter) async {
return _flutter.breakAt( return _flutter.breakAt(
Uri.parse('package:test/main.dart'), _project.buildMethodBreakpointUri,
_project.buildMethodBreakpointLine); _project.buildMethodBreakpointLine);
} }
Future<VMIsolate> breakInTopLevelFunction(FlutterTestDriver flutter) async { Future<VMIsolate> breakInTopLevelFunction(FlutterTestDriver flutter) async {
return _flutter.breakAt( return _flutter.breakAt(
Uri.parse('package:test/main.dart'), _project.topLevelFunctionBreakpointUri,
_project.topLevelFunctionBreakpointLine); _project.topLevelFunctionBreakpointLine);
} }
......
...@@ -41,7 +41,7 @@ void main() { ...@@ -41,7 +41,7 @@ void main() {
test('reload hits breakpoints after reload', () async { test('reload hits breakpoints after reload', () async {
await _flutter.run(withDebugger: true); await _flutter.run(withDebugger: true);
final VMIsolate isolate = await _flutter.breakAt( final VMIsolate isolate = await _flutter.breakAt(
Uri.parse('package:test/main.dart'), _project.breakpointUri,
_project.breakpointLine); _project.breakpointLine);
expect(isolate.pauseEvent, isInstanceOf<VMPauseBreakpointEvent>()); expect(isolate.pauseEvent, isInstanceOf<VMPauseBreakpointEvent>());
}); });
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
import 'package:flutter_tools/src/base/file_system.dart';
import 'test_project.dart'; import 'test_project.dart';
class BasicProject extends TestProject { class BasicProject extends TestProject {
...@@ -41,9 +39,9 @@ class BasicProject extends TestProject { ...@@ -41,9 +39,9 @@ class BasicProject extends TestProject {
} }
'''; ''';
String get buildMethodBreakpointFile => breakpointFile; Uri get buildMethodBreakpointUri => breakpointUri;
int get buildMethodBreakpointLine => breakpointLine; 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'); int get topLevelFunctionBreakpointLine => lineContaining(main, '// TOP LEVEL BREAKPOINT');
} }
...@@ -16,8 +16,7 @@ abstract class TestProject { ...@@ -16,8 +16,7 @@ abstract class TestProject {
String get main; String get main;
// Valid locations for a breakpoint for tests that just need to break somewhere. // Valid locations for a breakpoint for tests that just need to break somewhere.
String get breakpointFile => fs.path.join( Uri get breakpointUri => Uri.parse('package:test/main.dart');
dir.path, 'lib', 'main.dart');
int get breakpointLine => lineContaining(main, '// BREAKPOINT'); int get breakpointLine => lineContaining(main, '// BREAKPOINT');
Future<void> setUpIn(Directory dir) async { Future<void> setUpIn(Directory dir) async {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment