| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "include/dart_debugger_api.h" | 5 #include "include/dart_debugger_api.h" |
| 6 #include "vm/dart_api_impl.h" | 6 #include "vm/dart_api_impl.h" |
| 7 #include "vm/dart_entry.h" | 7 #include "vm/dart_entry.h" |
| 8 #include "vm/debugger.h" | 8 #include "vm/debugger.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/message_handler.h" | 10 #include "vm/message_handler.h" |
| (...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 994 Dart_Handle port = | 994 Dart_Handle port = |
| 995 Api::NewHandle(isolate, DartLibraryCalls::NewSendPort(port_id)); | 995 Api::NewHandle(isolate, DartLibraryCalls::NewSendPort(port_id)); |
| 996 EXPECT_VALID(port); | 996 EXPECT_VALID(port); |
| 997 EXPECT_VALID(Dart_SetField(lib, NewString("port"), port)); | 997 EXPECT_VALID(Dart_SetField(lib, NewString("port"), port)); |
| 998 | 998 |
| 999 Instance& service_msg = Instance::Handle(); | 999 Instance& service_msg = Instance::Handle(); |
| 1000 service_msg = Eval(lib, "[port, ['heapmap'], [], []]"); | 1000 service_msg = Eval(lib, "[port, ['heapmap'], [], []]"); |
| 1001 Service::HandleIsolateMessage(isolate, service_msg); | 1001 Service::HandleIsolateMessage(isolate, service_msg); |
| 1002 handler.HandleNextMessage(); | 1002 handler.HandleNextMessage(); |
| 1003 EXPECT_SUBSTRING("\"type\":\"HeapMap\"", handler.msg()); | 1003 EXPECT_SUBSTRING("\"type\":\"HeapMap\"", handler.msg()); |
| 1004 EXPECT_SUBSTRING("\"pages\":[[", handler.msg()); | 1004 EXPECT_SUBSTRING("\"pages\":[", handler.msg()); |
| 1005 EXPECT_SUBSTRING("]]", handler.msg()); | |
| 1006 } | 1005 } |
| 1007 | 1006 |
| 1008 | 1007 |
| 1009 static const char* alpha_callback( | 1008 static const char* alpha_callback( |
| 1010 const char* name, | 1009 const char* name, |
| 1011 const char** arguments, | 1010 const char** arguments, |
| 1012 intptr_t num_arguments, | 1011 intptr_t num_arguments, |
| 1013 const char** option_keys, | 1012 const char** option_keys, |
| 1014 const char** option_values, | 1013 const char** option_values, |
| 1015 intptr_t num_options, | 1014 intptr_t num_options, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 Service::HandleIsolateMessage(isolate, service_msg); | 1100 Service::HandleIsolateMessage(isolate, service_msg); |
| 1102 handler.HandleNextMessage(); | 1101 handler.HandleNextMessage(); |
| 1103 EXPECT_STREQ("alpha", handler.msg()); | 1102 EXPECT_STREQ("alpha", handler.msg()); |
| 1104 service_msg = Eval(lib, "[port, ['beta'], [], []]"); | 1103 service_msg = Eval(lib, "[port, ['beta'], [], []]"); |
| 1105 Service::HandleIsolateMessage(isolate, service_msg); | 1104 Service::HandleIsolateMessage(isolate, service_msg); |
| 1106 handler.HandleNextMessage(); | 1105 handler.HandleNextMessage(); |
| 1107 EXPECT_STREQ("beta", handler.msg()); | 1106 EXPECT_STREQ("beta", handler.msg()); |
| 1108 } | 1107 } |
| 1109 | 1108 |
| 1110 } // namespace dart | 1109 } // namespace dart |
| OLD | NEW |