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

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

Issue 1152753005: Service cleanups... (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update docs. Tweak TypeRef and BoundedType. Created 5 years, 6 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
« no previous file with comments | « runtime/vm/service_event.cc ('k') | no next file » | 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 EXPECT_SUBSTRING("\"error\"", handler.msg()); 197 EXPECT_SUBSTRING("\"error\"", handler.msg());
198 198
199 // The following test checks that a code object can be found only 199 // The following test checks that a code object can be found only
200 // at compile_timestamp()-code.EntryPoint(). 200 // at compile_timestamp()-code.EntryPoint().
201 service_msg = EvalF(lib, "[0, port, '0', 'getObject', " 201 service_msg = EvalF(lib, "[0, port, '0', 'getObject', "
202 "['objectId'], ['code/%" Px64"-%" Px "']]", 202 "['objectId'], ['code/%" Px64"-%" Px "']]",
203 compile_timestamp, 203 compile_timestamp,
204 entry); 204 entry);
205 Service::HandleIsolateMessage(isolate, service_msg); 205 Service::HandleIsolateMessage(isolate, service_msg);
206 handler.HandleNextMessage(); 206 handler.HandleNextMessage();
207 EXPECT_SUBSTRING("\"type\":\"Code\"", handler.msg());
207 { 208 {
208 // Only perform a partial match. 209 // Only perform a partial match.
209 const intptr_t kBufferSize = 512; 210 const intptr_t kBufferSize = 512;
210 char buffer[kBufferSize]; 211 char buffer[kBufferSize];
211 OS::SNPrint(buffer, kBufferSize-1, 212 OS::SNPrint(buffer, kBufferSize-1,
212 "{\"type\":\"Code\",\"fixedId\":true," 213 "\"fixedId\":true,\"id\":\"code\\/%" Px64 "-%" Px "\",",
213 "\"id\":\"code\\/%" Px64 "-%" Px "\",",
214 compile_timestamp, 214 compile_timestamp,
215 entry); 215 entry);
216 EXPECT_SUBSTRING(buffer, handler.msg()); 216 EXPECT_SUBSTRING(buffer, handler.msg());
217 } 217 }
218 218
219 // Request code object at compile_timestamp-code.EntryPoint() + 16 219 // Request code object at compile_timestamp-code.EntryPoint() + 16
220 // Expect this to fail because the address is not the entry point. 220 // Expect this to fail because the address is not the entry point.
221 uintptr_t address = entry + 16; 221 uintptr_t address = entry + 16;
222 service_msg = EvalF(lib, "[0, port, '0', 'getObject', " 222 service_msg = EvalF(lib, "[0, port, '0', 'getObject', "
223 "['objectId'], ['code/%" Px64"-%" Px "']]", 223 "['objectId'], ['code/%" Px64"-%" Px "']]",
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 Eval(lib, "[0, port, '0', '_getCpuProfile', ['tags'], ['Bogus']]"); 628 Eval(lib, "[0, port, '0', '_getCpuProfile', ['tags'], ['Bogus']]");
629 Service::HandleIsolateMessage(isolate, service_msg); 629 Service::HandleIsolateMessage(isolate, service_msg);
630 handler.HandleNextMessage(); 630 handler.HandleNextMessage();
631 // Expect error. 631 // Expect error.
632 EXPECT_SUBSTRING("\"error\"", handler.msg()); 632 EXPECT_SUBSTRING("\"error\"", handler.msg());
633 } 633 }
634 634
635 #endif // !defined(TARGET_ARCH_ARM64) 635 #endif // !defined(TARGET_ARCH_ARM64)
636 636
637 } // namespace dart 637 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/service_event.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698