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

Side by Side Diff: runtime/vm/service_test.cc

Issue 1057333004: Continue improving the documentation for the vm service protocol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/service/service.idl ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "platform/globals.h" 5 #include "platform/globals.h"
6 6
7 #include "include/dart_debugger_api.h" 7 #include "include/dart_debugger_api.h"
8 #include "vm/dart_api_impl.h" 8 #include "vm/dart_api_impl.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 vmlib.index()); 1166 vmlib.index());
1167 1167
1168 service_msg = Eval(lib, buf); 1168 service_msg = Eval(lib, buf);
1169 Service::HandleIsolateMessage(isolate, service_msg); 1169 Service::HandleIsolateMessage(isolate, service_msg);
1170 handler.HandleNextMessage(); 1170 handler.HandleNextMessage();
1171 OS::SNPrint(buf, sizeof(buf), 1171 OS::SNPrint(buf, sizeof(buf),
1172 "{\"type\":\"Script\"," 1172 "{\"type\":\"Script\","
1173 "\"id\":\"libraries\\/%" Pd "\\/scripts\\/test-lib\"," 1173 "\"id\":\"libraries\\/%" Pd "\\/scripts\\/test-lib\","
1174 "\"name\":\"test-lib\"," 1174 "\"name\":\"test-lib\","
1175 "\"kind\":\"script\"," 1175 "\"kind\":\"script\","
1176 "\"owningLibrary\":{\"type\":\"@Library\"," 1176 "\"library\":{\"type\":\"@Library\","
1177 "\"id\":\"libraries\\/%" Pd "\",\"name\":\"\"," 1177 "\"id\":\"libraries\\/%" Pd "\",\"name\":\"\","
1178 "\"url\":\"test-lib\"}," 1178 "\"url\":\"test-lib\"},"
1179 "\"source\":\"var port;\\n\\nmain() {\\n}\"," 1179 "\"source\":\"var port;\\n\\nmain() {\\n}\","
1180 "\"tokenPosTable\":[[1,0,1,1,5,2,9],[3,5,1,6,5,7,6,8,8],[4,10,1]]}", 1180 "\"tokenPosTable\":[[1,0,1,1,5,2,9],[3,5,1,6,5,7,6,8,8],[4,10,1]]}",
1181 vmlib.index(), vmlib.index()); 1181 vmlib.index(), vmlib.index());
1182 EXPECT_STREQ(buf, handler.msg()); 1182 EXPECT_STREQ(buf, handler.msg());
1183 } 1183 }
1184 1184
1185 1185
1186 TEST_CASE(Service_AllocationProfile) { 1186 TEST_CASE(Service_AllocationProfile) {
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 Eval(lib, "[0, port, 'getCpuProfile', ['tags'], ['Bogus']]"); 1472 Eval(lib, "[0, port, 'getCpuProfile', ['tags'], ['Bogus']]");
1473 Service::HandleIsolateMessage(isolate, service_msg); 1473 Service::HandleIsolateMessage(isolate, service_msg);
1474 handler.HandleNextMessage(); 1474 handler.HandleNextMessage();
1475 // Expect error. 1475 // Expect error.
1476 EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg()); 1476 EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg());
1477 } 1477 }
1478 1478
1479 #endif // !defined(TARGET_ARCH_ARM64) 1479 #endif // !defined(TARGET_ARCH_ARM64)
1480 1480
1481 } // namespace dart 1481 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/service/service.idl ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698