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

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

Issue 542363003: Don't double-escape in strings in the VM Service, and don't use \u0000 to determine the string lengt (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: build Created 6 years, 3 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/report_test.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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 handler.filterMsg("id"); 616 handler.filterMsg("id");
617 EXPECT_STREQ( 617 EXPECT_STREQ(
618 "{\"type\":\"List\",\"_vmType\":\"Array\"," 618 "{\"type\":\"List\",\"_vmType\":\"Array\","
619 "\"class\":{\"type\":\"@Class\",\"name\":\"_List\",}," 619 "\"class\":{\"type\":\"@Class\",\"name\":\"_List\",},"
620 "\"fields\":[]," 620 "\"fields\":[],"
621 "\"length\":1," 621 "\"length\":1,"
622 "\"elements\":[{" 622 "\"elements\":[{"
623 "\"index\":0," 623 "\"index\":0,"
624 "\"value\":{\"type\":\"@String\"," 624 "\"value\":{\"type\":\"@String\","
625 "\"class\":{\"type\":\"@Class\",\"name\":\"_OneByteString\",}," 625 "\"class\":{\"type\":\"@Class\",\"name\":\"_OneByteString\",},"
626 "\"valueAsString\":\"\\\"value\\\"\"}}]}", 626 "\"valueAsString\":\"value\"}}]}",
627 handler.msg()); 627 handler.msg());
628 628
629 // object id ring / invalid => expired 629 // object id ring / invalid => expired
630 service_msg = Eval(lib, "[0, port, ['objects', '99999999'], [], []]"); 630 service_msg = Eval(lib, "[0, port, ['objects', '99999999'], [], []]");
631 Service::HandleIsolateMessage(isolate, service_msg); 631 Service::HandleIsolateMessage(isolate, service_msg);
632 handler.HandleNextMessage(); 632 handler.HandleNextMessage();
633 handler.filterMsg("_vmName"); 633 handler.filterMsg("_vmName");
634 EXPECT_STREQ( 634 EXPECT_STREQ(
635 "{\"type\":\"Sentinel\",\"id\":\"objects\\/expired\"," 635 "{\"type\":\"Sentinel\",\"id\":\"objects\\/expired\","
636 "\"valueAsString\":\"<expired>\"}", 636 "\"valueAsString\":\"<expired>\"}",
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after
2195 service_msg = Eval(lib, "[0, port, ['profile'], ['tags'], ['hidden']]"); 2195 service_msg = Eval(lib, "[0, port, ['profile'], ['tags'], ['hidden']]");
2196 Service::HandleIsolateMessage(isolate, service_msg); 2196 Service::HandleIsolateMessage(isolate, service_msg);
2197 handler.HandleNextMessage(); 2197 handler.HandleNextMessage();
2198 // Expect error. 2198 // Expect error.
2199 EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg()); 2199 EXPECT_SUBSTRING("\"type\":\"Error\"", handler.msg());
2200 } 2200 }
2201 2201
2202 #endif // !defined(TARGET_ARCH_ARM64) 2202 #endif // !defined(TARGET_ARCH_ARM64)
2203 2203
2204 } // namespace dart 2204 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/report_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698