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

Unified Diff: editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java

Issue 825393005: Addition of the optional FileReadMode into the server spec. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 months 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
Index: editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java
diff --git a/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java b/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java
index 3d225c10b14b33ac23240a7460e2fc677b1137b0..e0bd70ca8f94b0eee95cb90bd287499d22653672 100644
--- a/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java
+++ b/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/RemoteAnalysisServerImplTest.java
@@ -51,6 +51,7 @@ import com.google.dart.server.generated.types.ExtractLocalVariableFeedback;
import com.google.dart.server.generated.types.ExtractLocalVariableOptions;
import com.google.dart.server.generated.types.ExtractMethodFeedback;
import com.google.dart.server.generated.types.ExtractMethodOptions;
+import com.google.dart.server.generated.types.FileReadMode;
import com.google.dart.server.generated.types.HighlightRegion;
import com.google.dart.server.generated.types.HighlightRegionType;
import com.google.dart.server.generated.types.HoverInformation;
@@ -1088,7 +1089,14 @@ public class RemoteAnalysisServerImplTest extends AbstractRemoteServerTest {
}
public void test_analysis_updateOptions_all_false() throws Exception {
- AnalysisOptions options = new AnalysisOptions(false, false, false, false, false, false);
+ AnalysisOptions options = new AnalysisOptions(
+ false,
+ false,
+ false,
+ false,
+ false,
+ false,
+ FileReadMode.AS_IS);
server.analysis_updateOptions(options);
List<JsonObject> requests = requestSink.getRequests();
JsonElement expected = parseJson(//
@@ -1102,7 +1110,8 @@ public class RemoteAnalysisServerImplTest extends AbstractRemoteServerTest {
" 'enableEnums': false,",
" 'generateDart2jsHints': false,",
" 'generateHints': false,",
- " 'generateLints': false",
+ " 'generateLints': false,",
+ " 'fileReadMode': AS_IS",
" }",
" }",
"}");
@@ -1110,7 +1119,14 @@ public class RemoteAnalysisServerImplTest extends AbstractRemoteServerTest {
}
public void test_analysis_updateOptions_all_true() throws Exception {
- AnalysisOptions options = new AnalysisOptions(true, true, true, true, true, true);
+ AnalysisOptions options = new AnalysisOptions(
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ FileReadMode.NORMALIZE_EOL);
server.analysis_updateOptions(options);
List<JsonObject> requests = requestSink.getRequests();
JsonElement expected = parseJson(//
@@ -1124,7 +1140,8 @@ public class RemoteAnalysisServerImplTest extends AbstractRemoteServerTest {
" 'enableEnums': true,",
" 'generateDart2jsHints': true,",
" 'generateHints': true,",
- " 'generateLints': true",
+ " 'generateLints': true,",
+ " 'fileReadMode': NORMALIZE_EOL",
" }",
" }",
"}");
@@ -1132,7 +1149,7 @@ public class RemoteAnalysisServerImplTest extends AbstractRemoteServerTest {
}
public void test_analysis_updateOptions_subset1() throws Exception {
- AnalysisOptions options = new AnalysisOptions(true, null, null, null, null, null);
+ AnalysisOptions options = new AnalysisOptions(true, null, null, null, null, null, null);
server.analysis_updateOptions(options);
List<JsonObject> requests = requestSink.getRequests();
JsonElement expected = parseJson(//
@@ -1149,7 +1166,7 @@ public class RemoteAnalysisServerImplTest extends AbstractRemoteServerTest {
}
public void test_analysis_updateOptions_subset2() throws Exception {
- AnalysisOptions options = new AnalysisOptions(false, true, null, null, null, null);
+ AnalysisOptions options = new AnalysisOptions(false, true, null, null, null, null, null);
server.analysis_updateOptions(options);
List<JsonObject> requests = requestSink.getRequests();
JsonElement expected = parseJson(//

Powered by Google App Engine
This is Rietveld 408576698