Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1296)

Unified Diff: pkg/analysis_server/test/edit/organize_directives_test.dart

Issue 2491953002: Support 'edit.organizeDirectives' with the new analysis driver. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/edit/edit_domain.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/edit/organize_directives_test.dart
diff --git a/pkg/analysis_server/test/edit/organize_directives_test.dart b/pkg/analysis_server/test/edit/organize_directives_test.dart
index 89b8c30b6021a28d47484d14494bbeb7d57b4e51..d35439aea616ec4abe0d9b141cd7c28fb99655a9 100644
--- a/pkg/analysis_server/test/edit/organize_directives_test.dart
+++ b/pkg/analysis_server/test/edit/organize_directives_test.dart
@@ -38,7 +38,7 @@ class OrganizeDirectivesTest extends AbstractAnalysisTest {
await waitForTasksFinished();
Request request =
new EditOrganizeDirectivesParams('/no/such/file.dart').toRequest('0');
- Response response = handler.handleRequest(request);
+ Response response = await waitResponse(request);
expect(
response, isResponseFailure('0', RequestErrorCode.FILE_NOT_ANALYZED));
}
@@ -51,7 +51,7 @@ main() {}
''');
await waitForTasksFinished();
Request request = new EditOrganizeDirectivesParams(testFile).toRequest('0');
- Response response = handler.handleRequest(request);
+ Response response = await waitResponse(request);
expect(response,
isResponseFailure('0', RequestErrorCode.ORGANIZE_DIRECTIVES_ERROR));
}
@@ -60,7 +60,7 @@ main() {}
await waitForTasksFinished();
Request request =
new EditOrganizeDirectivesParams('/not-a-Dart-file.txt').toRequest('0');
- Response response = handler.handleRequest(request);
+ Response response = await waitResponse(request);
expect(
response, isResponseFailure('0', RequestErrorCode.FILE_NOT_ANALYZED));
}
@@ -158,14 +158,14 @@ main() {
Future _assertOrganized(String expectedCode) async {
await waitForTasksFinished();
- _requestOrganize();
+ await _requestOrganize();
String resultCode = SourceEdit.applySequence(testCode, fileEdit.edits);
expect(resultCode, expectedCode);
}
- void _requestOrganize() {
+ Future _requestOrganize() async {
Request request = new EditOrganizeDirectivesParams(testFile).toRequest('0');
- Response response = handleSuccessfulRequest(request);
+ Response response = await waitResponse(request);
var result = new EditOrganizeDirectivesResult.fromResponse(response);
fileEdit = result.edit;
}
« no previous file with comments | « pkg/analysis_server/lib/src/edit/edit_domain.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698