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

Unified Diff: runtime/vm/debugger_api_impl_test.cc

Issue 14029016: Remove legacy debugger API function (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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/debugger_api_impl.cc ('k') | runtime/vm/snapshot_test.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 21241)
+++ runtime/vm/debugger_api_impl_test.cc (working copy)
@@ -29,12 +29,10 @@
ASSERT(script_lib != NULL);
ASSERT(!Dart_IsError(script_lib));
ASSERT(Dart_IsLibrary(script_lib));
- Dart_Breakpoint bpt;
Dart_Handle res = Dart_SetBreakpointAtEntry(script_lib,
NewString(cname),
- NewString(fname),
- &bpt);
- EXPECT_TRUE(res);
+ NewString(fname));
+ EXPECT(Dart_IsInteger(res));
}
@@ -998,14 +996,17 @@
func = test_lib.LookupFunctionInSource(script_url, 10);
EXPECT(func.IsNull());
- Dart_Handle libs = Dart_GetLibraryURLs();
+ Dart_Handle libs = Dart_GetLibraryIds();
EXPECT(Dart_IsList(libs));
intptr_t num_libs;
Dart_ListLength(libs, &num_libs);
EXPECT(num_libs > 0);
for (int i = 0; i < num_libs; i++) {
- Dart_Handle lib_url = Dart_ListGetAt(libs, i);
- EXPECT(Dart_IsString(lib_url));
+ Dart_Handle lib_id = Dart_ListGetAt(libs, i);
+ EXPECT(Dart_IsInteger(lib_id));
+ int64_t id = 0;
+ Dart_IntegerToInt64(lib_id, &id);
+ Dart_Handle lib_url = Dart_GetLibraryURL(id);
char const* chars;
Dart_StringToCString(lib_url, &chars);
OS::Print("Lib %d: %s\n", i, chars);
@@ -1033,35 +1034,6 @@
}
-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 = NewString(TestCase::url());
- Dart_Handle source = NewString(kScriptChars);
- EXPECT_VALID(Dart_LoadScript(url, source, 0, 0));
-
- 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);
-}
-
-
static Dart_IsolateId test_isolate_id = ILLEGAL_ISOLATE_ID;
static int verify_callback = 0;
static void TestIsolateID(Dart_IsolateId isolate_id, Dart_IsolateEvent kind) {
« no previous file with comments | « runtime/vm/debugger_api_impl.cc ('k') | runtime/vm/snapshot_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698