Skip to content

Commit d4ec13f

Browse files
committed
replaced wildcard with timer
1 parent aa38d3a commit d4ec13f

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

dwds/test/common/chrome_proxy_service_common.dart

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,24 +1542,20 @@ void runTests({
15421542
expect(first.code!.name, 'printCount');
15431543
});
15441544

1545-
test(
1546-
'stack has a variable',
1547-
() async {
1548-
final stack = await breakAt('callPrintCount');
1549-
expect(stack, isNotNull);
1550-
expect(stack.frames, hasLength(1));
1551-
final first = stack.frames!.first;
1552-
expect(first.kind, 'Regular');
1553-
expect(first.code!.kind, 'Dart');
1554-
expect(first.code!.name, '<closure>');
1555-
// TODO: Make this more precise once this case doesn't
1556-
// also include all the libraries.
1557-
expect(first.vars, hasLength(greaterThanOrEqualTo(1)));
1558-
final underscore = first.vars!.firstWhere((v) => v.name == '_');
1559-
expect(underscore, isNotNull);
1560-
},
1561-
skip: 'https://github.com/dart-lang/webdev/issues/2570',
1562-
);
1545+
test('stack has a variable', () async {
1546+
final stack = await breakAt('callPrintCount');
1547+
expect(stack, isNotNull);
1548+
expect(stack.frames, hasLength(1));
1549+
final first = stack.frames!.first;
1550+
expect(first.kind, 'Regular');
1551+
expect(first.code!.kind, 'Dart');
1552+
expect(first.code!.name, '<closure>');
1553+
// TODO: Make this more precise once this case doesn't
1554+
// also include all the libraries.
1555+
expect(first.vars, hasLength(greaterThanOrEqualTo(1)));
1556+
final underscore = first.vars!.firstWhere((v) => v.name == 'timer');
1557+
expect(underscore, isNotNull);
1558+
});
15631559

15641560
test('collects async frames', () async {
15651561
final stack = await breakAt('asyncCall');

fixtures/_testSound/example/hello_world/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void main() async {
7676
scheduleMicrotask(() => throw Exception('UncaughtException'));
7777
};
7878

79-
Timer.periodic(const Duration(seconds: 1), (_) {
79+
Timer.periodic(const Duration(seconds: 1), (timer) {
8080
printCount(); // Breakpoint: callPrintCount
8181
});
8282

0 commit comments

Comments
 (0)