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

Unified Diff: runtime/vm/unit_test.cc

Issue 270503007: Eliminate unused url mapping parameter in dartutils (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 | « runtime/vm/unit_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/unit_test.cc
===================================================================
--- runtime/vm/unit_test.cc (revision 35981)
+++ runtime/vm/unit_test.cc (working copy)
@@ -81,7 +81,12 @@
Dart_Handle builtin_lib =
Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary);
DART_CHECK_VALID(builtin_lib);
- return DartUtils::CanonicalizeURL(NULL, library, url_chars);
+
+ Dart_Handle library_url = Dart_LibraryUrl(library);
+ if (Dart_IsError(library_url)) {
+ return library_url;
+ }
+ return DartUtils::ResolveUri(library_url, url, builtin_lib);
}
if (is_dart_scheme_url) {
ASSERT(tag == Dart_kImportTag);
@@ -101,17 +106,14 @@
Builtin::PartSource(Builtin::kIOLibrary,
url_chars));
}
- return DartUtils::LoadSource(NULL,
- library,
- url,
- tag,
- url_chars);
+ return DartUtils::LoadSource(library, url, tag, url_chars);
}
Dart_Handle TestCase::LoadTestScript(const char* script,
- Dart_NativeEntryResolver resolver) {
- Dart_Handle url = NewString(TestCase::url());
+ Dart_NativeEntryResolver resolver,
+ const char* lib_url) {
+ Dart_Handle url = NewString(lib_url);
Dart_Handle source = NewString(script);
Dart_Handle result = Dart_SetLibraryTagHandler(LibraryTagHandler);
EXPECT_VALID(result);
@@ -124,6 +126,12 @@
}
+Dart_Handle TestCase::LoadCoreTestScript(const char* script,
+ Dart_NativeEntryResolver resolver) {
+ return LoadTestScript(script, resolver, CORELIB_TEST_URI);
+}
+
+
Dart_Handle TestCase::lib() {
Dart_Handle url = NewString(TestCase::url());
Dart_Handle lib = Dart_LookupLibrary(url);
« no previous file with comments | « runtime/vm/unit_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698