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

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

Issue 556573002: Make SdkLibrary.shortName consistently include 'dart:' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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: pkg/analysis_server/test/mock_sdk.dart
diff --git a/pkg/analysis_server/test/mock_sdk.dart b/pkg/analysis_server/test/mock_sdk.dart
index 852548146f2f822a70593559b9e6251d65c27c15..fa520dfb8765683a3631dc395bd0027cf925868e 100644
--- a/pkg/analysis_server/test/mock_sdk.dart
+++ b/pkg/analysis_server/test/mock_sdk.dart
@@ -13,9 +13,11 @@ import 'package:analyzer/src/generated/source.dart';
class MockSdk implements DartSdk {
static const _MockSdkLibrary LIB_CORE =
- const _MockSdkLibrary('core', '/lib/core/core.dart', '''
+ const _MockSdkLibrary('dart:core', '/lib/core/core.dart', '''
library dart.core;
+import 'dart:async';
+
class Object {
bool operator ==(other) => identical(this, other);
}
@@ -71,8 +73,11 @@ void print(Object object) {}
''');
static const _MockSdkLibrary LIB_ASYNC =
- const _MockSdkLibrary('async', '/lib/async/async.dart', '''
+ const _MockSdkLibrary('dart:async', '/lib/async/async.dart', '''
library dart.async;
+
+import 'dart:math';
+
class Future {
static Future wait(List<Future> futures) => null;
}
@@ -81,7 +86,7 @@ class Stream<T> {}
''');
static const _MockSdkLibrary LIB_MATH =
- const _MockSdkLibrary('math', '/lib/math/math.dart', '''
+ const _MockSdkLibrary('dart:math', '/lib/math/math.dart', '''
library dart.math;
const double E = 2.718281828459045;
const double PI = 3.1415926535897932;
@@ -91,7 +96,7 @@ class Random {}
''');
static const _MockSdkLibrary LIB_HTML =
- const _MockSdkLibrary('html', '/lib/html/dartium/html_dartium.dart', '''
+ const _MockSdkLibrary('dart:html', '/lib/html/dartium/html_dartium.dart', '''
library dart.html;
class HtmlElement {}
''');
@@ -138,7 +143,7 @@ class HtmlElement {}
String path = library.shortName;
try {
resource.File file = provider.getResource(uri.path);
- Uri dartUri = new Uri(scheme: 'dart', path: library.shortName);
+ Uri dartUri = new Uri(scheme: 'dart', path: path);
return file.createSource(dartUri);
} catch (exception) {
return null;
« no previous file with comments | « pkg/analysis_server/test/edit/fixes_test.dart ('k') | pkg/analysis_server/test/services/correction/fix_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698