diff --git a/fixtures/_webdevSoundSmoke/web/main.dart b/fixtures/_webdevSoundSmoke/web/main.dart index a8be53f93..8e3be2873 100644 --- a/fixtures/_webdevSoundSmoke/web/main.dart +++ b/fixtures/_webdevSoundSmoke/web/main.dart @@ -23,3 +23,5 @@ void main() { print('Counter is: ${++count}'); // Breakpoint: printCounter }); } + +String topLevelMethod() => 'verify this!'; diff --git a/webdev/test/e2e_test.dart b/webdev/test/e2e_test.dart index fe7100efe..102d3f3ff 100644 --- a/webdev/test/e2e_test.dart +++ b/webdev/test/e2e_test.dart @@ -382,15 +382,15 @@ void main() { 'valueAsString', 'Hello World!!')); - result = - await vmService.evaluate(isolateId, libraryId, 'main.toString()'); + result = await vmService.evaluate( + isolateId, libraryId, 'topLevelMethod()'); expect( result, const TypeMatcher().having( (instance) => instance.valueAsString, 'valueAsString', - contains('Closure: () => void'))); + equals('verify this!'))); } finally { await vmService?.dispose(); await exitWebdev(process); @@ -555,7 +555,7 @@ void main() { expect( () => - vmService!.evaluate(isolateId, libraryId, 'main.toString()'), + vmService!.evaluate(isolateId, libraryId, 'topLevelMethod()'), throwsRPCError); } finally { await vmService?.dispose();