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

Unified Diff: runtime/vm/debugger_api_impl_test.cc

Issue 10416050: Remove the partially completed code for remote IsolateMirrors and (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/dart_entry.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger_api_impl_test.cc
===================================================================
--- runtime/vm/debugger_api_impl_test.cc (revision 8116)
+++ runtime/vm/debugger_api_impl_test.cc (working copy)
@@ -975,6 +975,36 @@
EXPECT_STREQ(kScriptChars, source_chars);
}
+
+TEST_CASE(GetLibraryURLs) {
+ const char* kScriptChars =
+ "main() {"
+ " return 12345;"
+ "}";
+
+ Dart_Handle lib_list = Dart_GetLibraryURLs();
+ EXPECT_VALID(lib_list);
+ EXPECT(Dart_IsList(lib_list));
+ Dart_Handle list_as_string = Dart_ToString(lib_list);
+ const char* list_cstr = "";
+ EXPECT_VALID(Dart_StringToCString(list_as_string, &list_cstr));
+ EXPECT_NOTSUBSTRING(TestCase::url(), list_cstr);
+
+ // Load a script.
+ Dart_Handle url = Dart_NewString(TestCase::url());
+ Dart_Handle source = Dart_NewString(kScriptChars);
+ EXPECT_VALID(Dart_LoadScript(url, source));
+
+ lib_list = Dart_GetLibraryURLs();
+ EXPECT_VALID(lib_list);
+ EXPECT(Dart_IsList(lib_list));
+ list_as_string = Dart_ToString(lib_list);
+ list_cstr = "";
+ EXPECT_VALID(Dart_StringToCString(list_as_string, &list_cstr));
+ EXPECT_SUBSTRING(TestCase::url(), list_cstr);
+}
+
+
#endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
} // namespace dart
« no previous file with comments | « runtime/vm/dart_entry.h ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698