| 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 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 Dart_Handle port = | 1083 Dart_Handle port = |
| 1084 Api::NewHandle(isolate, DartLibraryCalls::NewSendPort(port_id)); | 1084 Api::NewHandle(isolate, DartLibraryCalls::NewSendPort(port_id)); |
| 1085 EXPECT_VALID(port); | 1085 EXPECT_VALID(port); |
| 1086 EXPECT_VALID(Dart_SetField(lib, NewString("port"), port)); | 1086 EXPECT_VALID(Dart_SetField(lib, NewString("port"), port)); |
| 1087 | 1087 |
| 1088 Instance& service_msg = Instance::Handle(); | 1088 Instance& service_msg = Instance::Handle(); |
| 1089 service_msg = Eval(lib, "[port, ['heapmap'], [], []]"); | 1089 service_msg = Eval(lib, "[port, ['heapmap'], [], []]"); |
| 1090 Service::HandleIsolateMessage(isolate, service_msg); | 1090 Service::HandleIsolateMessage(isolate, service_msg); |
| 1091 handler.HandleNextMessage(); | 1091 handler.HandleNextMessage(); |
| 1092 EXPECT_SUBSTRING("\"type\":\"HeapMap\"", handler.msg()); | 1092 EXPECT_SUBSTRING("\"type\":\"HeapMap\"", handler.msg()); |
| 1093 EXPECT_SUBSTRING("\"pages\":[[", handler.msg()); | 1093 EXPECT_SUBSTRING("\"pages\":[", handler.msg()); |
| 1094 EXPECT_SUBSTRING("]]", handler.msg()); | |
| 1095 } | 1094 } |
| 1096 | 1095 |
| 1097 | 1096 |
| 1098 static const char* alpha_callback( | 1097 static const char* alpha_callback( |
| 1099 const char* name, | 1098 const char* name, |
| 1100 const char** arguments, | 1099 const char** arguments, |
| 1101 intptr_t num_arguments, | 1100 intptr_t num_arguments, |
| 1102 const char** option_keys, | 1101 const char** option_keys, |
| 1103 const char** option_values, | 1102 const char** option_values, |
| 1104 intptr_t num_options, | 1103 intptr_t num_options, |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 EXPECT_SUBSTRING("\"type\":\"Profile\"", handler.msg()); | 1236 EXPECT_SUBSTRING("\"type\":\"Profile\"", handler.msg()); |
| 1238 | 1237 |
| 1239 service_msg = Eval(h_lib, "[port, ['profile'], ['tags'], ['hidden']]"); | 1238 service_msg = Eval(h_lib, "[port, ['profile'], ['tags'], ['hidden']]"); |
| 1240 Service::HandleIsolateMessage(isolate, service_msg); | 1239 Service::HandleIsolateMessage(isolate, service_msg); |
| 1241 handler.HandleNextMessage(); | 1240 handler.HandleNextMessage(); |
| 1242 // Expect error. | 1241 // Expect error. |
| 1243 EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg()); | 1242 EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg()); |
| 1244 } | 1243 } |
| 1245 | 1244 |
| 1246 } // namespace dart | 1245 } // namespace dart |
| OLD | NEW |