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

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

Issue 292663012: Retaining path in Observatory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/service.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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 // Retained by single instance. 556 // Retained by single instance.
557 service_msg = Eval(lib, 557 service_msg = Eval(lib,
558 "[port, ['objects', '$validId', 'retained'], [], []]"); 558 "[port, ['objects', '$validId', 'retained'], [], []]");
559 Service::HandleIsolateMessage(isolate, service_msg); 559 Service::HandleIsolateMessage(isolate, service_msg);
560 handler.HandleNextMessage(); 560 handler.HandleNextMessage();
561 handler.filterMsg("name"); 561 handler.filterMsg("name");
562 ExpectSubstringF(handler.msg(), 562 ExpectSubstringF(handler.msg(),
563 "\"id\":\"objects\\/int-%" Pd "\"", 563 "\"id\":\"objects\\/int-%" Pd "\"",
564 arr.raw()->Size() + arr.At(0)->Size()); 564 arr.raw()->Size() + arr.At(0)->Size());
565 565
566 // Retaining path to 'arr', limit 1.
567 service_msg = Eval(
568 lib,
569 "[port, ['objects', '$validId', 'retaining_path'], ['limit'], ['1']]");
570 Service::HandleIsolateMessage(isolate, service_msg);
571 handler.HandleNextMessage();
572 ExpectSubstringF(
573 handler.msg(),
574 "{\"type\":\"RetainingPath\",\"id\":\"retaining_path\",\"length\":1,"
575 "\"elements\":[{\"index\":0,\"value\":{\"type\":\"@Array\"");
576
577 // Retaining path missing limit.
578 service_msg = Eval(
579 lib,
580 "[port, ['objects', '$validId', 'retaining_path'], [], []]");
581 Service::HandleIsolateMessage(isolate, service_msg);
582 handler.HandleNextMessage();
583 ExpectSubstringF(handler.msg(), "{\"type\":\"Error\"");
584
566 // eval against list containing an internal object. 585 // eval against list containing an internal object.
567 Object& internal_object = Object::Handle(); 586 Object& internal_object = Object::Handle();
568 internal_object = LiteralToken::New(); 587 internal_object = LiteralToken::New();
569 arr.SetAt(0, internal_object); 588 arr.SetAt(0, internal_object);
570 service_msg = Eval(lib, 589 service_msg = Eval(lib,
571 "[port, ['objects', '$validId', 'eval'], " 590 "[port, ['objects', '$validId', 'eval'], "
572 "['expr'], ['toString()']]"); 591 "['expr'], ['toString()']]");
573 Service::HandleIsolateMessage(isolate, service_msg); 592 Service::HandleIsolateMessage(isolate, service_msg);
574 handler.HandleNextMessage(); 593 handler.HandleNextMessage();
575 ExpectSubstringF(handler.msg(), "\"type\":\"Error\""); 594 ExpectSubstringF(handler.msg(), "\"type\":\"Error\"");
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
1419 service_msg = Eval(h_lib, "[port, ['profile'], ['tags'], ['hidden']]"); 1438 service_msg = Eval(h_lib, "[port, ['profile'], ['tags'], ['hidden']]");
1420 Service::HandleIsolateMessage(isolate, service_msg); 1439 Service::HandleIsolateMessage(isolate, service_msg);
1421 handler.HandleNextMessage(); 1440 handler.HandleNextMessage();
1422 // Expect error. 1441 // Expect error.
1423 EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg()); 1442 EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg());
1424 } 1443 }
1425 1444
1426 #endif // !defined(TARGET_ARCH_ARM64) 1445 #endif // !defined(TARGET_ARCH_ARM64)
1427 1446
1428 } // namespace dart 1447 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698