Skip to content

Re-enable skipped reload test #1958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 14, 2023
11 changes: 6 additions & 5 deletions dwds/test/reload_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,13 @@ void main() {
var isolate = await client.getIsolate(isolateId);
var library = isolate.rootLib!.uri!;

final String callback =
'(_, __) async => ServiceExtensionResponse.result("")';

await client.evaluate(
isolateId,
library,
"registerExtension('ext.foo', (method, params) {})",
"registerExtension('ext.foo', $callback)",
);

expect(await client.callServiceExtension('hotRestart'),
Expand All @@ -244,17 +247,15 @@ void main() {
await client.evaluate(
isolateId,
library,
"registerExtension('ext.bar', (method, params) {})",
"registerExtension('ext.bar', $callback)",
);

await eventsDone;

final source = await context.webDriver.pageSource;
// Main is re-invoked which shouldn't clear the state.
expect(source, contains('Hello World!'));
// TODO(https://github.com/dart-lang/webdev/issues/1818): Re-enable. The
// callback passed to registerExtension requires a non-null return type.
}, skip: 'https://github.com/dart-lang/webdev/issues/1818');
});

test('can refresh the page via the fullReload service extension', () async {
final client = context.debugConnection.vmService;
Expand Down