| Index: pkg/analysis_server/test/integration/analysis/update_content_test.dart
|
| diff --git a/pkg/analysis_server/test/integration/analysis/update_content_test.dart b/pkg/analysis_server/test/integration/analysis/update_content_test.dart
|
| index 6ea46cf51457606275c233f298c3915ea38d475b..b451396ffdb6e77405a632f3b4043db371376b4f 100644
|
| --- a/pkg/analysis_server/test/integration/analysis/update_content_test.dart
|
| +++ b/pkg/analysis_server/test/integration/analysis/update_content_test.dart
|
| @@ -27,36 +27,44 @@ main() {
|
| String badText = goodText.replaceAll(';', '');
|
| writeFile(pathname, badText);
|
| standardAnalysisSetup();
|
| - return analysisFinished.then((_) {
|
| - // The contents on disk (badText) are missing a semicolon.
|
| - expect(currentAnalysisErrors[pathname], isNotEmpty);
|
| - })
|
| + return analysisFinished
|
| + .then((_) {
|
| + // The contents on disk (badText) are missing a semicolon.
|
| + expect(currentAnalysisErrors[pathname], isNotEmpty);
|
| + })
|
| .then((_) => sendAnalysisUpdateContent(
|
| {pathname: new AddContentOverlay(goodText)}))
|
| .then((result) => analysisFinished)
|
| .then((_) {
|
| - // There should be no errors now because the contents on disk have been
|
| - // overriden with goodText.
|
| - expect(currentAnalysisErrors[pathname], isEmpty);
|
| - return sendAnalysisUpdateContent({
|
| - pathname: new ChangeContentOverlay(
|
| - [new SourceEdit(goodText.indexOf(';'), 1, '')])
|
| - });
|
| - }).then((result) => analysisFinished).then((_) {
|
| - // There should be errors now because we've removed the semicolon.
|
| - expect(currentAnalysisErrors[pathname], isNotEmpty);
|
| - return sendAnalysisUpdateContent({
|
| - pathname: new ChangeContentOverlay(
|
| - [new SourceEdit(goodText.indexOf(';'), 0, ';')])
|
| - });
|
| - }).then((result) => analysisFinished).then((_) {
|
| - // There should be no errors now because we've added the semicolon back.
|
| - expect(currentAnalysisErrors[pathname], isEmpty);
|
| - return sendAnalysisUpdateContent({pathname: new RemoveContentOverlay()});
|
| - }).then((result) => analysisFinished).then((_) {
|
| - // Now there should be errors again, because the contents on disk are no
|
| - // longer overridden.
|
| - expect(currentAnalysisErrors[pathname], isNotEmpty);
|
| - });
|
| + // There should be no errors now because the contents on disk have been
|
| + // overriden with goodText.
|
| + expect(currentAnalysisErrors[pathname], isEmpty);
|
| + return sendAnalysisUpdateContent({
|
| + pathname: new ChangeContentOverlay(
|
| + [new SourceEdit(goodText.indexOf(';'), 1, '')])
|
| + });
|
| + })
|
| + .then((result) => analysisFinished)
|
| + .then((_) {
|
| + // There should be errors now because we've removed the semicolon.
|
| + expect(currentAnalysisErrors[pathname], isNotEmpty);
|
| + return sendAnalysisUpdateContent({
|
| + pathname: new ChangeContentOverlay(
|
| + [new SourceEdit(goodText.indexOf(';'), 0, ';')])
|
| + });
|
| + })
|
| + .then((result) => analysisFinished)
|
| + .then((_) {
|
| + // There should be no errors now because we've added the semicolon back.
|
| + expect(currentAnalysisErrors[pathname], isEmpty);
|
| + return sendAnalysisUpdateContent(
|
| + {pathname: new RemoveContentOverlay()});
|
| + })
|
| + .then((result) => analysisFinished)
|
| + .then((_) {
|
| + // Now there should be errors again, because the contents on disk are no
|
| + // longer overridden.
|
| + expect(currentAnalysisErrors[pathname], isNotEmpty);
|
| + });
|
| }
|
| }
|
|
|