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

Unified Diff: runtime/vm/debugger_api_impl_test.cc

Issue 2364923003: Fix vm/cc/Debug_StepInto test which relied on old defaults (Closed)
Patch Set: Created 4 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
« 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: runtime/vm/debugger_api_impl_test.cc
diff --git a/runtime/vm/debugger_api_impl_test.cc b/runtime/vm/debugger_api_impl_test.cc
index 80311f1169d12bbaa4ac4d943e2569d7393fdd67..a41d10b2081cddb14b45942af89f163eaf66d000 100644
--- a/runtime/vm/debugger_api_impl_test.cc
+++ b/runtime/vm/debugger_api_impl_test.cc
@@ -38,6 +38,29 @@ static void SetBreakpointAtEntry(const char* cname, const char* fname) {
}
+static void DisableDebuggabilityOfDartColonLibraries() {
+ const char* dart_colon = "dart:";
+ const intptr_t dart_colon_length = strlen(dart_colon);
+ // Disable debuggability of all dart: libraries.
+ Dart_Handle library_ids = Dart_GetLibraryIds();
+ intptr_t library_ids_length;
+ Dart_ListLength(library_ids, &library_ids_length);
+ for (intptr_t i = 0; i < library_ids_length; i++) {
+ Dart_Handle library_id_handle = Dart_ListGetAt(library_ids, i);
+ int64_t library_id;
+ Dart_IntegerToInt64(library_id_handle, &library_id);
+ Dart_Handle library_url_handle = Dart_GetLibraryURL(library_id);
+ const char* library_url;
+ Dart_StringToCString(library_url_handle, &library_url);
+ if (strncmp(library_url, dart_colon, dart_colon_length) == 0) {
+ Dart_SetLibraryDebuggable(library_id, false);
+ } else {
+ Dart_SetLibraryDebuggable(library_id, true);
+ }
+ }
+}
+
+
static Dart_Handle Invoke(const char* func_name) {
ASSERT(script_lib != NULL);
ASSERT(!Dart_IsError(script_lib));
@@ -741,6 +764,8 @@ TEST_CASE(Debug_StepInto) {
LoadScript(kScriptChars);
Dart_SetPausedEventHandler(&TestStepIntoHandler);
+ DisableDebuggabilityOfDartColonLibraries();
+
SetBreakpointAtEntry("", "main");
breakpoint_hit = false;
breakpoint_hit_counter = 0;
« 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