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

Unified Diff: pkg/analysis_server/test/analysis_abstract.dart

Issue 2404733002: Fix more tests on windows bots (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/analysis_abstract.dart
diff --git a/pkg/analysis_server/test/analysis_abstract.dart b/pkg/analysis_server/test/analysis_abstract.dart
index 817e5174993250b5731e225dab6a602ff601461f..40446a9009c8e17d9be55ddea41e374a1e8f02e3 100644
--- a/pkg/analysis_server/test/analysis_abstract.dart
+++ b/pkg/analysis_server/test/analysis_abstract.dart
@@ -57,9 +57,9 @@ class AbstractAnalysisTest {
<GeneralAnalysisService>[];
final Map<AnalysisService, List<String>> analysisSubscriptions = {};
- String projectPath = '/project';
- String testFolder = '/project/bin';
- String testFile = '/project/bin/test.dart';
+ String projectPath;
+ String testFolder;
+ String testFile;
String testCode;
AbstractAnalysisTest();
@@ -84,6 +84,7 @@ class AbstractAnalysisTest {
}
String addFile(String path, String content) {
+ path = resourceProvider.convertPath(path);
resourceProvider.newFile(path, content);
return path;
}
@@ -133,7 +134,8 @@ class AbstractAnalysisTest {
index,
serverPlugin,
new AnalysisServerOptions(),
- new DartSdkManager('/', false, (_) => sdk),
+ new DartSdkManager(
+ resourceProvider.convertPath('/'), false, (_) => sdk),
InstrumentationService.NULL_SERVICE);
}
@@ -146,8 +148,9 @@ class AbstractAnalysisTest {
*/
void createProject({Map<String, String> packageRoots}) {
resourceProvider.newFolder(projectPath);
- Request request =
- new AnalysisSetAnalysisRootsParams([projectPath], [], packageRoots: packageRoots).toRequest('0');
+ Request request = new AnalysisSetAnalysisRootsParams([projectPath], [],
+ packageRoots: packageRoots)
+ .toRequest('0');
handleSuccessfulRequest(request, handler: analysisHandler);
}
@@ -206,6 +209,9 @@ class AbstractAnalysisTest {
void setUp() {
serverChannel = new MockServerChannel();
resourceProvider = new MemoryResourceProvider();
+ projectPath = resourceProvider.convertPath('/project');
+ testFolder = resourceProvider.convertPath('/project/bin');
+ testFile = resourceProvider.convertPath('/project/bin/test.dart');
packageMapProvider = new MockPackageMapProvider();
Index index = createIndex();
server = createAnalysisServer(index);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698