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

Unified Diff: runtime/vm/debugger_test.cc

Issue 1978603002: Remove DebuggerEvent. Refactor remaining code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: before landing Created 4 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/debugger_api_impl.cc ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger_test.cc
diff --git a/runtime/vm/debugger_test.cc b/runtime/vm/debugger_test.cc
index ffe32417fafac27549491198eadf60d6f64d48de..d005402d4bbe602614bd60aea1e61db4c542262f 100644
--- a/runtime/vm/debugger_test.cc
+++ b/runtime/vm/debugger_test.cc
@@ -46,7 +46,6 @@ TEST_CASE(Debugger_PrintBreakpointsToJSONArray) {
Isolate* isolate = Isolate::Current();
Debugger* debugger = isolate->debugger();
- const String& url = String::Handle(String::New(TestCase::url()));
// Empty case.
{
@@ -59,8 +58,9 @@ TEST_CASE(Debugger_PrintBreakpointsToJSONArray) {
}
// Test with a couple of breakpoints.
- debugger->SetBreakpointAtLine(url, 2);
- debugger->SetBreakpointAtLine(url, 3);
+ Dart_Handle url = NewString(TestCase::url());
+ EXPECT_VALID(Dart_SetBreakpoint(url, 2));
+ EXPECT_VALID(Dart_SetBreakpoint(url, 3));
{
JSONStream js;
{
@@ -98,9 +98,9 @@ static void InspectPausedEvent(Dart_IsolateId isolate_id,
// The debugger knows that it is paused, and why.
EXPECT(debugger->IsPaused());
- const DebuggerEvent* event = debugger->PauseEvent();
+ const ServiceEvent* event = debugger->PauseEvent();
EXPECT(event != NULL);
- EXPECT(event->type() == DebuggerEvent::kBreakpointReached);
+ EXPECT(event->kind() == ServiceEvent::kPauseBreakpoint);
saw_paused_event = true;
}
@@ -118,7 +118,6 @@ TEST_CASE(Debugger_PauseEvent) {
Isolate* isolate = Isolate::Current();
Debugger* debugger = isolate->debugger();
- const String& url = String::Handle(String::New(TestCase::url()));
// No pause event.
EXPECT(!debugger->IsPaused());
@@ -128,7 +127,7 @@ TEST_CASE(Debugger_PauseEvent) {
Dart_SetPausedEventHandler(InspectPausedEvent);
// Set a breakpoint and run.
- debugger->SetBreakpointAtLine(url, 2);
+ EXPECT_VALID(Dart_SetBreakpoint(NewString(TestCase::url()), 2));
Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
EXPECT_VALID(result);
EXPECT(Dart_IsString(result));
« no previous file with comments | « runtime/vm/debugger_api_impl.cc ('k') | runtime/vm/exceptions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698