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

Side by Side Diff: runtime/bin/vmservice/observatory/tests/ui/inspector.dart

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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // See inspector.txt for expected behavior. 5 // See inspector.txt for expected behavior.
6 6
7 library manual_inspector_test; 7 library manual_inspector_test;
8 8
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 import 'dart:mirrors'; 10 import 'dart:mirrors';
(...skipping 25 matching lines...) Expand all
36 var mirrorClass; 36 var mirrorClass;
37 var mirrorClosure; 37 var mirrorClosure;
38 var mirrorInstance; 38 var mirrorInstance;
39 var mirrorReference; 39 var mirrorReference;
40 var portReceive; 40 var portReceive;
41 var portSend; 41 var portSend;
42 var regex; 42 var regex;
43 var smi; 43 var smi;
44 var stacktrace; 44 var stacktrace;
45 var string; 45 var string;
46 var stringEscapedUnicodeEscape;
47 var stringHebrew;
46 var stringLatin1; 48 var stringLatin1;
49 var stringNewLinesAndTabs;
50 var stringNullInTheMiddle;
47 var stringSnowflake; 51 var stringSnowflake;
52 var stringTrebleClefs;
48 var stringUnicode; 53 var stringUnicode;
49 var theFalse; 54 var theFalse;
50 var theNull; 55 var theNull;
51 var theTrue; 56 var theTrue;
52 var type; 57 var type;
53 var typeParameter; 58 var typeParameter;
54 var typedData; 59 var typedData;
55 var uninitialized = new Object(); 60 var uninitialized = new Object();
56 var userTag; 61 var userTag;
57 var weakProperty; 62 var weakProperty;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 mint = 1 << 32; 125 mint = 1 << 32;
121 mirrorClass = reflectClass(Object); 126 mirrorClass = reflectClass(Object);
122 mirrorClosure = reflect(blockFull); 127 mirrorClosure = reflect(blockFull);
123 mirrorInstance = reflect("a reflectee"); 128 mirrorInstance = reflect("a reflectee");
124 mirrorReference = extractPrivateField(mirrorClass, '_reflectee'); 129 mirrorReference = extractPrivateField(mirrorClass, '_reflectee');
125 portReceive = new RawReceivePort(); 130 portReceive = new RawReceivePort();
126 regex = new RegExp("a*b+c"); 131 regex = new RegExp("a*b+c");
127 smi = 7; 132 smi = 7;
128 stacktrace = genStacktrace(); 133 stacktrace = genStacktrace();
129 string = "Hello"; 134 string = "Hello";
135 stringEscapedUnicodeEscape = "Should not be A: \\u0041";
136 stringHebrew = "שלום רב שובך צפורה נחמדת"; // Right-to-left text.
130 stringLatin1 = "blåbærgrød"; 137 stringLatin1 = "blåbærgrød";
138 stringNewLinesAndTabs = "One fish\ttwo fish\nRed fish\tBlue fish\n";
139 stringNullInTheMiddle = "There are four\u0000 words.";
131 stringSnowflake = "❄"; 140 stringSnowflake = "❄";
141 stringTrebleClefs = "1𝄞2𝄞𝄞3𝄞𝄞𝄞"; // Surrogate pair.
132 stringUnicode = "Îñţérñåţîöñåļîžåţîờñ"; 142 stringUnicode = "Îñţérñåţîöñåļîžåţîờñ";
133 theFalse = false; 143 theFalse = false;
134 theNull = null; 144 theNull = null;
135 theTrue = true; 145 theTrue = true;
136 type = String; 146 type = String;
137 typeParameter = extractPrivateField(reflectClass(A).typeVariables.single, '_re flectee'); 147 typeParameter = extractPrivateField(reflectClass(A).typeVariables.single, '_re flectee');
138 typedData = extractPrivateField(new ByteData(64), '_typedData'); 148 typedData = extractPrivateField(new ByteData(64), '_typedData');
139 userTag = new UserTag("Example tag name"); 149 userTag = new UserTag("Example tag name");
140 weakProperty = extractPrivateField(expando, '_data').firstWhere((e) => e != nu ll); 150 weakProperty = extractPrivateField(expando, '_data').firstWhere((e) => e != nu ll);
141 151
142 Isolate.spawn(secondMain, "Hello").then((otherIsolate) { 152 Isolate.spawn(secondMain, "Hello").then((otherIsolate) {
143 isolate = otherIsolate; 153 isolate = otherIsolate;
144 portSend = otherIsolate.controlPort; 154 portSend = otherIsolate.controlPort;
145 capability = otherIsolate.terminateCapability; 155 capability = otherIsolate.terminateCapability;
146 }); 156 });
147 157
148 print("Finished main"); 158 print("Finished main");
149 } 159 }
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/observatory/test/string_escaping_test.dart ('k') | runtime/vm/json_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698