| OLD | NEW |
| 1 /// Debugger custom formatter tests. | 1 Test: List<String> formatting header |
| 2 /// If the tests fail, paste the expected output into the [expectedGolden] | |
| 3 /// string literal in this file and audit the diff to ensure changes are | |
| 4 /// expected. | |
| 5 /// | |
| 6 /// Currently only DDC supports debugging objects with custom formatters | |
| 7 /// but it is reasonable to add support to Dart2JS in the future. | |
| 8 @JS() | |
| 9 library debugger_test; | |
| 10 | |
| 11 import 'dart:html'; | |
| 12 import 'package:js/js.dart'; | |
| 13 import 'package:js/js_util.dart' as js_util; | |
| 14 | |
| 15 import 'package:expect/minitest.dart'; | |
| 16 | |
| 17 import 'dart:_debugger' as _debugger; | |
| 18 | |
| 19 class TestClass { | |
| 20 String name = 'test class'; | |
| 21 int date; | |
| 22 static List<int> foo = [1, 2, 3, 4]; | |
| 23 static String greeting = 'Hello world'; | |
| 24 static Object bar = new Object(); | |
| 25 | |
| 26 static exampleStaticMethod(x) => x * 2; | |
| 27 | |
| 28 TestClass(this.date); | |
| 29 | |
| 30 String nameAndDate() => '$name on day $date'; | |
| 31 | |
| 32 int last(List<int> list) => list.last; | |
| 33 | |
| 34 void addOne(String name) { | |
| 35 name = '${name}1'; | |
| 36 } | |
| 37 | |
| 38 get someInt => 42; | |
| 39 get someString => "Hello world"; | |
| 40 get someObject => this; | |
| 41 | |
| 42 Object returnObject() => bar; | |
| 43 } | |
| 44 | |
| 45 class TestGenericClass<X, Y> { | |
| 46 TestGenericClass(this.x); | |
| 47 X x; | |
| 48 } | |
| 49 | |
| 50 @JS('Object.getOwnPropertyNames') | |
| 51 external List getOwnPropertyNames(obj); | |
| 52 | |
| 53 @JS('devtoolsFormatters') | |
| 54 external List get _devtoolsFormatters; | |
| 55 List get devtoolsFormatters => _devtoolsFormatters; | |
| 56 | |
| 57 @JS('JSON.stringify') | |
| 58 external stringify(value, [Function replacer, int space]); | |
| 59 | |
| 60 // TODO(jacobr): this is only valid if the legacy library loader is used. | |
| 61 // We need a solution that works with all library loaders. | |
| 62 @JS('dart_library.import') | |
| 63 external importDartLibrary(String path); | |
| 64 | |
| 65 // Replacer normalizes file names that could vary depending on the test runner. | |
| 66 // styles. | |
| 67 replacer(String key, value) { | |
| 68 // The values for keys with name 'object' may be arbitrary Dart nested | |
| 69 // Objects so are not safe to stringify. | |
| 70 if (key == 'object') return '<OBJECT>'; | |
| 71 if (value is String) { | |
| 72 if (value.contains('dart_sdk.js')) return '<DART_SDK>'; | |
| 73 if (new RegExp(r'[.](js|dart|html)').hasMatch(value)) return '<FILE>'; | |
| 74 } | |
| 75 return value; | |
| 76 } | |
| 77 | |
| 78 String format(value) { | |
| 79 // Avoid double-escaping strings. | |
| 80 if (value is String) return value; | |
| 81 return stringify(value, replacer, 4); | |
| 82 } | |
| 83 | |
| 84 class FormattedObject { | |
| 85 FormattedObject(this.object, this.config); | |
| 86 | |
| 87 Object object; | |
| 88 Object config; | |
| 89 } | |
| 90 | |
| 91 /// Extract all object tags from a json ml expression to enable | |
| 92 /// calling the custom formatter on the extracted object tag. | |
| 93 List<FormattedObject> extractNestedFormattedObjects(json) { | |
| 94 var ret = <FormattedObject>[]; | |
| 95 if (json is String || json is bool || json is num) return ret; | |
| 96 if (json is List) { | |
| 97 for (var e in json) { | |
| 98 ret.addAll(extractNestedFormattedObjects(e)); | |
| 99 } | |
| 100 return ret; | |
| 101 } | |
| 102 | |
| 103 for (var name in getOwnPropertyNames(json)) { | |
| 104 if (name == 'object') { | |
| 105 // Found a nested formatted object. | |
| 106 ret.add(new FormattedObject(js_util.getProperty(json, 'object'), | |
| 107 js_util.getProperty(json, 'config'))); | |
| 108 return ret; | |
| 109 } | |
| 110 ret.addAll(extractNestedFormattedObjects(js_util.getProperty(json, name))); | |
| 111 } | |
| 112 return ret; | |
| 113 } | |
| 114 | |
| 115 main() { | |
| 116 if (devtoolsFormatters == null) { | |
| 117 print("Warning: no devtools custom formatters specified. Skipping tests."); | |
| 118 return; | |
| 119 } | |
| 120 var _devtoolsFormatter = devtoolsFormatters.first; | |
| 121 | |
| 122 var actual = new StringBuffer(); | |
| 123 | |
| 124 // Accumulate the entire expected custom formatted data as a single | |
| 125 // massive string buffer so it is simple to update expectations when | |
| 126 // modifying the formatting code. | |
| 127 // Otherwise a small formatting change would result in tweaking lots | |
| 128 // of expectations. | |
| 129 // The verify golden match test cases does the final comparison of golden | |
| 130 // to expected output. | |
| 131 addGolden(String name, value) { | |
| 132 actual.write('Test: $name\n' | |
| 133 'Value:\n' | |
| 134 '${format(value)}\n' | |
| 135 '-----------------------------------\n'); | |
| 136 } | |
| 137 | |
| 138 addFormatterGoldens(String name, object, [config]) { | |
| 139 addGolden( | |
| 140 '$name formatting header', _devtoolsFormatter.header(object, config)); | |
| 141 addGolden('$name formatting body', _devtoolsFormatter.body(object, config)); | |
| 142 } | |
| 143 | |
| 144 // Include goldens for the nested [[class]] definition field. | |
| 145 addNestedFormatterGoldens(String name, obj) { | |
| 146 addGolden('$name instance header', _devtoolsFormatter.header(obj, null)); | |
| 147 var body = _devtoolsFormatter.body(obj, null); | |
| 148 addGolden('$name instance body', body); | |
| 149 | |
| 150 var nestedObjects = extractNestedFormattedObjects(body); | |
| 151 var clazz = nestedObjects.last; | |
| 152 // By convention assume last nested object is the [[class]] definition | |
| 153 // describing the object's static members and inheritance hierarchy | |
| 154 addFormatterGoldens('$name definition', clazz.object, clazz.config); | |
| 155 } | |
| 156 | |
| 157 // Include goldens for the nested [[class]] definition field. | |
| 158 addAllNestedFormatterGoldens(String name, obj) { | |
| 159 addGolden('$name header', _devtoolsFormatter.header(obj, null)); | |
| 160 var body = _devtoolsFormatter.body(obj, null); | |
| 161 addGolden('$name body', body); | |
| 162 | |
| 163 var nestedObjects = extractNestedFormattedObjects(body); | |
| 164 var i = 0; | |
| 165 for (var nested in nestedObjects) { | |
| 166 addFormatterGoldens('$name child $i', nested.object, nested.config); | |
| 167 i++; | |
| 168 } | |
| 169 } | |
| 170 | |
| 171 group('Iterable formatting', () { | |
| 172 var list = ['foo', 'bar', 'baz']; | |
| 173 var iterable = list.map((x) => x * 5); | |
| 174 addFormatterGoldens('List<String>', list); | |
| 175 | |
| 176 var listOfObjects = <Object>[42, 'bar', true]; | |
| 177 | |
| 178 addNestedFormatterGoldens('List<Object>', listOfObjects); | |
| 179 | |
| 180 var largeList = <int>[]; | |
| 181 for (var i = 0; i < 200; ++i) { | |
| 182 largeList.add(i * 10); | |
| 183 } | |
| 184 addNestedFormatterGoldens('List<int> large', largeList); | |
| 185 | |
| 186 addNestedFormatterGoldens('Iterable', iterable); | |
| 187 | |
| 188 var s = new Set()..add("foo")..add(42)..add(true); | |
| 189 addNestedFormatterGoldens('Set', s); | |
| 190 }); | |
| 191 | |
| 192 group('Map formatting', () { | |
| 193 Map<String, int> foo = new Map(); | |
| 194 foo = {'1': 2, 'x': 4, '5': 6}; | |
| 195 | |
| 196 addFormatterGoldens('Map<String, int>', foo); | |
| 197 test('hasBody', () { | |
| 198 expect(_devtoolsFormatter.hasBody(foo, null), isTrue); | |
| 199 }); | |
| 200 | |
| 201 Map<dynamic, dynamic> dynamicMap = new Map(); | |
| 202 dynamicMap = {1: 2, 'x': 4, true: "truthy"}; | |
| 203 | |
| 204 addNestedFormatterGoldens('Map<dynamic, dynamic>', dynamicMap); | |
| 205 }); | |
| 206 | |
| 207 group('Function formatting', () { | |
| 208 adder(int a, int b) => a + b; | |
| 209 | |
| 210 addFormatterGoldens('Function', adder); | |
| 211 | |
| 212 test('hasBody', () { | |
| 213 expect(_devtoolsFormatter.hasBody(adder, null), isTrue); | |
| 214 }); | |
| 215 | |
| 216 addEventListener(String name, bool callback(Event e)) => null; | |
| 217 | |
| 218 addFormatterGoldens('Function with functon arguments', addEventListener); | |
| 219 | |
| 220 // Closure | |
| 221 addGolden('dart:html method', window.addEventListener); | |
| 222 | |
| 223 // Get a reference to the JS constructor for a Dart class. | |
| 224 // This tracks a regression bug where overly verbose and confusing output | |
| 225 // was shown for this case. | |
| 226 var testClass = new TestClass(17); | |
| 227 var dartConstructor = js_util.getProperty( | |
| 228 js_util.getProperty(testClass, '__proto__'), 'constructor'); | |
| 229 addFormatterGoldens('Raw reference to dart constructor', dartConstructor); | |
| 230 }); | |
| 231 | |
| 232 group('Object formatting', () { | |
| 233 var object = new Object(); | |
| 234 addFormatterGoldens('Object', object); | |
| 235 test('hasBody', () { | |
| 236 expect(_devtoolsFormatter.hasBody(object, null), isTrue); | |
| 237 }); | |
| 238 }); | |
| 239 | |
| 240 group('Type formatting', () { | |
| 241 addFormatterGoldens('Type TestClass', TestClass); | |
| 242 addFormatterGoldens('Type HttpRequest', HttpRequest); | |
| 243 }); | |
| 244 | |
| 245 group('JS interop object formatting', () { | |
| 246 var object = js_util.newObject(); | |
| 247 js_util.setProperty(object, 'foo', 'bar'); | |
| 248 // Make sure we don't apply the Dart custom formatter to JS interop objects. | |
| 249 expect(_devtoolsFormatter.header(object, null), isNull); | |
| 250 }); | |
| 251 | |
| 252 group('Module formatting', () { | |
| 253 var moduleNames = _debugger.getModuleNames(); | |
| 254 var testModuleName = "lib/html/debugger_test"; | |
| 255 expect(moduleNames.contains(testModuleName), isTrue); | |
| 256 | |
| 257 addAllNestedFormatterGoldens( | |
| 258 'Test library Module', _debugger.getModuleLibraries(testModuleName)); | |
| 259 }); | |
| 260 | |
| 261 group('StackTrace formatting', () { | |
| 262 StackTrace stack; | |
| 263 try { | |
| 264 throw new Error(); | |
| 265 } catch (exception, stackTrace) { | |
| 266 stack = stackTrace; | |
| 267 } | |
| 268 addFormatterGoldens('StackTrace', stack); | |
| 269 test('hasBody', () { | |
| 270 expect(_devtoolsFormatter.hasBody(stack, null), isTrue); | |
| 271 }); | |
| 272 }); | |
| 273 | |
| 274 group('Class formatting', () { | |
| 275 addNestedFormatterGoldens('TestClass', new TestClass(17)); | |
| 276 addNestedFormatterGoldens('MouseEvent', new MouseEvent("click")); | |
| 277 // This is a good class to test as it has statics and a deep inheritance hei
rarchy | |
| 278 addNestedFormatterGoldens('HttpRequest', new HttpRequest()); | |
| 279 }); | |
| 280 | |
| 281 test('verify golden match', () { | |
| 282 // Warning: all other test groups must have run for this test to be meaningf
ul | |
| 283 print("Actual:##############\n$actual\n#################"); | |
| 284 | |
| 285 expect(actual.toString().trim(), equals(expectedGolden().trim())); | |
| 286 }); | |
| 287 } | |
| 288 | |
| 289 /// The golden custom formatter output is placed at the bottom of the file | |
| 290 /// to simplify replacing the golden data when the custom formatter code is | |
| 291 /// changed. | |
| 292 /// | |
| 293 /// This value is placed in a function rather than a field to avoid a recursive | |
| 294 /// program that prints itself issue as the golden includes the formatter output | |
| 295 /// for this library | |
| 296 String expectedGolden() => r"""Test: List<String> formatting header | |
| 297 Value: | 2 Value: |
| 298 [ | 3 [ |
| 299 "span", | 4 "span", |
| 300 { | 5 { |
| 301 "style": "background-color: #d9edf7;" | 6 "style": "background-color: #d9edf7;" |
| 302 }, | 7 }, |
| 303 "JSArray<String> length 3" | 8 "JSArray<String> length 3" |
| 304 ] | 9 ] |
| 305 ----------------------------------- | 10 ----------------------------------- |
| 306 Test: List<String> formatting body | 11 Test: List<String> formatting body |
| (...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1845 [ | 1550 [ |
| 1846 "li", | 1551 "li", |
| 1847 { | 1552 { |
| 1848 "style": "padding-left: 13px;" | 1553 "style": "padding-left: 13px;" |
| 1849 }, | 1554 }, |
| 1850 [ | 1555 [ |
| 1851 "span", | 1556 "span", |
| 1852 { | 1557 { |
| 1853 "style": "color: rgb(136, 19, 145); margin-right: -13px" | 1558 "style": "color: rgb(136, 19, 145); margin-right: -13px" |
| 1854 }, | 1559 }, |
| 1560 "toString: " |
| 1561 ], |
| 1562 [ |
| 1563 "span", |
| 1564 { |
| 1565 "style": "margin-left: 13px" |
| 1566 }, |
| 1567 [ |
| 1568 "object", |
| 1569 { |
| 1570 "object": "<OBJECT>", |
| 1571 "config": { |
| 1572 "name": "none" |
| 1573 } |
| 1574 } |
| 1575 ] |
| 1576 ] |
| 1577 ], |
| 1578 [ |
| 1579 "li", |
| 1580 { |
| 1581 "style": "padding-left: 13px;" |
| 1582 }, |
| 1583 [ |
| 1584 "span", |
| 1585 { |
| 1586 "style": "color: rgb(136, 19, 145); margin-right: -13px" |
| 1587 }, |
| 1855 "where: " | 1588 "where: " |
| 1856 ], | 1589 ], |
| 1857 [ | 1590 [ |
| 1858 "span", | 1591 "span", |
| 1859 { | 1592 { |
| 1860 "style": "margin-left: 13px" | 1593 "style": "margin-left: 13px" |
| 1861 }, | 1594 }, |
| 1862 [ | 1595 [ |
| 1863 "object", | 1596 "object", |
| 1864 { | 1597 { |
| (...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3387 [ | 3120 [ |
| 3388 "li", | 3121 "li", |
| 3389 { | 3122 { |
| 3390 "style": "padding-left: 13px;" | 3123 "style": "padding-left: 13px;" |
| 3391 }, | 3124 }, |
| 3392 [ | 3125 [ |
| 3393 "span", | 3126 "span", |
| 3394 { | 3127 { |
| 3395 "style": "color: rgb(136, 19, 145); margin-right: -13px" | 3128 "style": "color: rgb(136, 19, 145); margin-right: -13px" |
| 3396 }, | 3129 }, |
| 3130 "toString: " |
| 3131 ], |
| 3132 [ |
| 3133 "span", |
| 3134 { |
| 3135 "style": "margin-left: 13px" |
| 3136 }, |
| 3137 [ |
| 3138 "object", |
| 3139 { |
| 3140 "object": "<OBJECT>", |
| 3141 "config": { |
| 3142 "name": "none" |
| 3143 } |
| 3144 } |
| 3145 ] |
| 3146 ] |
| 3147 ], |
| 3148 [ |
| 3149 "li", |
| 3150 { |
| 3151 "style": "padding-left: 13px;" |
| 3152 }, |
| 3153 [ |
| 3154 "span", |
| 3155 { |
| 3156 "style": "color: rgb(136, 19, 145); margin-right: -13px" |
| 3157 }, |
| 3397 "where: " | 3158 "where: " |
| 3398 ], | 3159 ], |
| 3399 [ | 3160 [ |
| 3400 "span", | 3161 "span", |
| 3401 { | 3162 { |
| 3402 "style": "margin-left: 13px" | 3163 "style": "margin-left: 13px" |
| 3403 }, | 3164 }, |
| 3404 [ | 3165 [ |
| 3405 "object", | 3166 "object", |
| 3406 { | 3167 { |
| (...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4796 ] | 4557 ] |
| 4797 ] | 4558 ] |
| 4798 ----------------------------------- | 4559 ----------------------------------- |
| 4799 Test: Map<dynamic, dynamic> instance header | 4560 Test: Map<dynamic, dynamic> instance header |
| 4800 Value: | 4561 Value: |
| 4801 [ | 4562 [ |
| 4802 "span", | 4563 "span", |
| 4803 { | 4564 { |
| 4804 "style": "background-color: #d9edf7;" | 4565 "style": "background-color: #d9edf7;" |
| 4805 }, | 4566 }, |
| 4806 "JsLinkedHashMap<Object, Object> length 3" | 4567 "JsLinkedHashMap length 3" |
| 4807 ] | 4568 ] |
| 4808 ----------------------------------- | 4569 ----------------------------------- |
| 4809 Test: Map<dynamic, dynamic> instance body | 4570 Test: Map<dynamic, dynamic> instance body |
| 4810 Value: | 4571 Value: |
| 4811 [ | 4572 [ |
| 4812 "ol", | 4573 "ol", |
| 4813 { | 4574 { |
| 4814 "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin
-bottom: 0px;margin-left: 12px;" | 4575 "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin
-bottom: 0px;margin-left: 12px;" |
| 4815 }, | 4576 }, |
| 4816 [ | 4577 [ |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4927 ] | 4688 ] |
| 4928 ] | 4689 ] |
| 4929 ----------------------------------- | 4690 ----------------------------------- |
| 4930 Test: Map<dynamic, dynamic> definition formatting header | 4691 Test: Map<dynamic, dynamic> definition formatting header |
| 4931 Value: | 4692 Value: |
| 4932 [ | 4693 [ |
| 4933 "span", | 4694 "span", |
| 4934 { | 4695 { |
| 4935 "style": "background-color: #d9edf7;" | 4696 "style": "background-color: #d9edf7;" |
| 4936 }, | 4697 }, |
| 4937 "JsLinkedHashMap<Object, Object> implements LinkedHashMap<Object, Object>, I
nternalMap<Object, Object>" | 4698 "JsLinkedHashMap implements LinkedHashMap, InternalMap" |
| 4938 ] | 4699 ] |
| 4939 ----------------------------------- | 4700 ----------------------------------- |
| 4940 Test: Map<dynamic, dynamic> definition formatting body | 4701 Test: Map<dynamic, dynamic> definition formatting body |
| 4941 Value: | 4702 Value: |
| 4942 [ | 4703 [ |
| 4943 "ol", | 4704 "ol", |
| 4944 { | 4705 { |
| 4945 "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin
-bottom: 0px;margin-left: 12px;" | 4706 "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin
-bottom: 0px;margin-left: 12px;" |
| 4946 }, | 4707 }, |
| 4947 [ | 4708 [ |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5401 [ | 5162 [ |
| 5402 "li", | 5163 "li", |
| 5403 { | 5164 { |
| 5404 "style": "padding-left: 13px;" | 5165 "style": "padding-left: 13px;" |
| 5405 }, | 5166 }, |
| 5406 [ | 5167 [ |
| 5407 "span", | 5168 "span", |
| 5408 { | 5169 { |
| 5409 "style": "color: rgb(136, 19, 145); margin-right: -13px" | 5170 "style": "color: rgb(136, 19, 145); margin-right: -13px" |
| 5410 }, | 5171 }, |
| 5172 "toString: " |
| 5173 ], |
| 5174 [ |
| 5175 "span", |
| 5176 { |
| 5177 "style": "margin-left: 13px" |
| 5178 }, |
| 5179 [ |
| 5180 "object", |
| 5181 { |
| 5182 "object": "<OBJECT>", |
| 5183 "config": { |
| 5184 "name": "none" |
| 5185 } |
| 5186 } |
| 5187 ] |
| 5188 ] |
| 5189 ], |
| 5190 [ |
| 5191 "li", |
| 5192 { |
| 5193 "style": "padding-left: 13px;" |
| 5194 }, |
| 5195 [ |
| 5196 "span", |
| 5197 { |
| 5198 "style": "color: rgb(136, 19, 145); margin-right: -13px" |
| 5199 }, |
| 5411 "_addHashTableEntry: " | 5200 "_addHashTableEntry: " |
| 5412 ], | 5201 ], |
| 5413 [ | 5202 [ |
| 5414 "span", | 5203 "span", |
| 5415 { | 5204 { |
| 5416 "style": "margin-left: 13px" | 5205 "style": "margin-left: 13px" |
| 5417 }, | 5206 }, |
| 5418 [ | 5207 [ |
| 5419 "object", | 5208 "object", |
| 5420 { | 5209 { |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6365 [ | 6154 [ |
| 6366 "object", | 6155 "object", |
| 6367 { | 6156 { |
| 6368 "object": "<OBJECT>", | 6157 "object": "<OBJECT>", |
| 6369 "config": { | 6158 "config": { |
| 6370 "name": "none" | 6159 "name": "none" |
| 6371 } | 6160 } |
| 6372 } | 6161 } |
| 6373 ] | 6162 ] |
| 6374 ] | 6163 ] |
| 6375 ], | |
| 6376 [ | |
| 6377 "li", | |
| 6378 { | |
| 6379 "style": "padding-left: 13px;" | |
| 6380 }, | |
| 6381 [ | |
| 6382 "span", | |
| 6383 { | |
| 6384 "style": "color: rgb(136, 19, 145); margin-right: -13px" | |
| 6385 }, | |
| 6386 "expectedGolden: " | |
| 6387 ], | |
| 6388 [ | |
| 6389 "span", | |
| 6390 { | |
| 6391 "style": "margin-left: 13px" | |
| 6392 }, | |
| 6393 [ | |
| 6394 "object", | |
| 6395 { | |
| 6396 "object": "<OBJECT>", | |
| 6397 "config": { | |
| 6398 "name": "none" | |
| 6399 } | |
| 6400 } | |
| 6401 ] | |
| 6402 ] | |
| 6403 ] | 6164 ] |
| 6404 ] | 6165 ] |
| 6405 ----------------------------------- | 6166 ----------------------------------- |
| 6406 Test: StackTrace formatting header | 6167 Test: StackTrace formatting header |
| 6407 Value: | 6168 Value: |
| 6408 [ | 6169 [ |
| 6409 "span", | 6170 "span", |
| 6410 { | 6171 { |
| 6411 "style": "background-color: #d9edf7;" | 6172 "style": "background-color: #d9edf7;" |
| 6412 }, | 6173 }, |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6511 "style": "padding-left: 13px;" | 6272 "style": "padding-left: 13px;" |
| 6512 }, | 6273 }, |
| 6513 [ | 6274 [ |
| 6514 "span", | 6275 "span", |
| 6515 {}, | 6276 {}, |
| 6516 [ | 6277 [ |
| 6517 "span", | 6278 "span", |
| 6518 { | 6279 { |
| 6519 "style": "" | 6280 "style": "" |
| 6520 }, | 6281 }, |
| 6521 "<FILE>" | 6282 "Generator.next (<anonymous>)" |
| 6522 ] | 6283 ] |
| 6523 ] | 6284 ] |
| 6524 ], | 6285 ], |
| 6525 [ | 6286 [ |
| 6526 "li", | 6287 "li", |
| 6527 { | 6288 { |
| 6528 "style": "padding-left: 13px;" | 6289 "style": "padding-left: 13px;" |
| 6529 }, | 6290 }, |
| 6530 [ | 6291 [ |
| 6531 "span", | 6292 "span", |
| 6532 {}, | 6293 {}, |
| 6533 [ | 6294 [ |
| 6534 "span", | 6295 "span", |
| 6535 { | 6296 { |
| 6536 "style": "" | 6297 "style": "" |
| 6537 }, | 6298 }, |
| 6538 "<FILE>" | 6299 "<DART_SDK>" |
| 6539 ] | 6300 ] |
| 6540 ] | 6301 ] |
| 6541 ], | 6302 ], |
| 6542 [ | 6303 [ |
| 6543 "li", | 6304 "li", |
| 6544 { | 6305 { |
| 6545 "style": "padding-left: 13px;" | 6306 "style": "padding-left: 13px;" |
| 6546 }, | 6307 }, |
| 6547 [ | 6308 [ |
| 6548 "span", | 6309 "span", |
| 6549 {}, | 6310 {}, |
| 6550 [ | 6311 [ |
| 6551 "span", | 6312 "span", |
| 6552 { | 6313 { |
| 6553 "style": "" | 6314 "style": "" |
| 6554 }, | 6315 }, |
| 6555 "<FILE>" | 6316 "<DART_SDK>" |
| 6556 ] | 6317 ] |
| 6557 ] | 6318 ] |
| 6558 ], | 6319 ], |
| 6559 [ | 6320 [ |
| 6560 "li", | 6321 "li", |
| 6561 { | 6322 { |
| 6562 "style": "padding-left: 13px;" | 6323 "style": "padding-left: 13px;" |
| 6563 }, | 6324 }, |
| 6564 [ | 6325 [ |
| 6565 "span", | 6326 "span", |
| 6566 {}, | 6327 {}, |
| 6567 [ | 6328 [ |
| 6568 "span", | 6329 "span", |
| 6569 { | 6330 { |
| 6570 "style": "" | 6331 "style": "" |
| 6571 }, | 6332 }, |
| 6572 "<FILE>" | 6333 "<DART_SDK>" |
| 6573 ] | 6334 ] |
| 6574 ] | 6335 ] |
| 6575 ], | 6336 ], |
| 6576 [ | 6337 [ |
| 6577 "li", | 6338 "li", |
| 6578 { | 6339 { |
| 6579 "style": "padding-left: 13px;" | 6340 "style": "padding-left: 13px;" |
| 6580 }, | 6341 }, |
| 6581 [ | 6342 [ |
| 6582 "span", | 6343 "span", |
| 6583 {}, | 6344 {}, |
| 6584 [ | 6345 [ |
| 6585 "span", | 6346 "span", |
| 6586 { | 6347 { |
| 6587 "style": "" | 6348 "style": "" |
| 6588 }, | 6349 }, |
| 6589 "<FILE>" | 6350 "<DART_SDK>" |
| 6590 ] | 6351 ] |
| 6591 ] | 6352 ] |
| 6592 ], | 6353 ], |
| 6593 [ | 6354 [ |
| 6594 "li", | 6355 "li", |
| 6595 { | 6356 { |
| 6596 "style": "padding-left: 13px;" | 6357 "style": "padding-left: 13px;" |
| 6597 }, | 6358 }, |
| 6598 [ | 6359 [ |
| 6599 "span", | 6360 "span", |
| 6600 {}, | 6361 {}, |
| 6601 [ | 6362 [ |
| 6602 "span", | 6363 "span", |
| 6603 { | 6364 { |
| 6604 "style": "" | 6365 "style": "" |
| 6605 }, | 6366 }, |
| 6606 "<FILE>" | 6367 "<DART_SDK>" |
| 6607 ] | 6368 ] |
| 6608 ] | 6369 ] |
| 6609 ] | 6370 ] |
| 6610 ] | 6371 ] |
| 6611 ----------------------------------- | 6372 ----------------------------------- |
| 6612 Test: TestClass instance header | 6373 Test: TestClass instance header |
| 6613 Value: | 6374 Value: |
| 6614 [ | 6375 [ |
| 6615 "span", | 6376 "span", |
| 6616 { | 6377 { |
| (...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8806 "object": "<OBJECT>", | 8567 "object": "<OBJECT>", |
| 8807 "config": { | 8568 "config": { |
| 8808 "name": "asClass" | 8569 "name": "asClass" |
| 8809 } | 8570 } |
| 8810 } | 8571 } |
| 8811 ] | 8572 ] |
| 8812 ] | 8573 ] |
| 8813 ] | 8574 ] |
| 8814 ] | 8575 ] |
| 8815 ----------------------------------- | 8576 ----------------------------------- |
| 8816 """; | 8577 Test: TestGenericClass instance header |
| 8578 Value: |
| 8579 [ |
| 8580 "span", |
| 8581 { |
| 8582 "style": "background-color: #d9edf7;" |
| 8583 }, |
| 8584 "TestGenericClass<int, List>" |
| 8585 ] |
| 8586 ----------------------------------- |
| 8587 Test: TestGenericClass instance body |
| 8588 Value: |
| 8589 [ |
| 8590 "ol", |
| 8591 { |
| 8592 "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin
-bottom: 0px;margin-left: 12px;" |
| 8593 }, |
| 8594 [ |
| 8595 "li", |
| 8596 { |
| 8597 "style": "padding-left: 13px;" |
| 8598 }, |
| 8599 [ |
| 8600 "span", |
| 8601 {}, |
| 8602 [ |
| 8603 "span", |
| 8604 { |
| 8605 "style": "color: rgb(136, 19, 145); margin-right: -13px" |
| 8606 }, |
| 8607 "x: " |
| 8608 ], |
| 8609 [ |
| 8610 "span", |
| 8611 { |
| 8612 "style": "margin-left: 13px" |
| 8613 }, |
| 8614 "42" |
| 8615 ] |
| 8616 ] |
| 8617 ], |
| 8618 [ |
| 8619 "li", |
| 8620 { |
| 8621 "style": "padding-left: 13px;" |
| 8622 }, |
| 8623 [ |
| 8624 "span", |
| 8625 { |
| 8626 "style": "color: rgb(136, 19, 145); margin-right: -13px" |
| 8627 }, |
| 8628 "[[class]]: " |
| 8629 ], |
| 8630 [ |
| 8631 "span", |
| 8632 { |
| 8633 "style": "margin-left: 13px" |
| 8634 }, |
| 8635 [ |
| 8636 "object", |
| 8637 { |
| 8638 "object": "<OBJECT>", |
| 8639 "config": { |
| 8640 "name": "asClass" |
| 8641 } |
| 8642 } |
| 8643 ] |
| 8644 ] |
| 8645 ] |
| 8646 ] |
| 8647 ----------------------------------- |
| 8648 Test: TestGenericClass definition formatting header |
| 8649 Value: |
| 8650 [ |
| 8651 "span", |
| 8652 { |
| 8653 "style": "background-color: #d9edf7;" |
| 8654 }, |
| 8655 "TestGenericClass<int, List>" |
| 8656 ] |
| 8657 ----------------------------------- |
| 8658 Test: TestGenericClass definition formatting body |
| 8659 Value: |
| 8660 [ |
| 8661 "ol", |
| 8662 { |
| 8663 "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin
-bottom: 0px;margin-left: 12px;" |
| 8664 }, |
| 8665 [ |
| 8666 "li", |
| 8667 { |
| 8668 "style": "padding-left: 13px;" |
| 8669 }, |
| 8670 [ |
| 8671 "span", |
| 8672 { |
| 8673 "style": "color: rgb(136, 19, 145); margin-right: -13px" |
| 8674 }, |
| 8675 "[[base class]]: " |
| 8676 ], |
| 8677 [ |
| 8678 "span", |
| 8679 { |
| 8680 "style": "margin-left: 13px" |
| 8681 }, |
| 8682 [ |
| 8683 "object", |
| 8684 { |
| 8685 "object": "<OBJECT>", |
| 8686 "config": { |
| 8687 "name": "asClass" |
| 8688 } |
| 8689 } |
| 8690 ] |
| 8691 ] |
| 8692 ] |
| 8693 ] |
| 8694 ----------------------------------- |
| 8695 Test: TestGenericClassJSInterop instance header |
| 8696 Value: |
| 8697 [ |
| 8698 "span", |
| 8699 { |
| 8700 "style": "background-color: #d9edf7;" |
| 8701 }, |
| 8702 "TestGenericClass<JSObject<ExampleJSClass>, int>" |
| 8703 ] |
| 8704 ----------------------------------- |
| 8705 Test: TestGenericClassJSInterop instance body |
| 8706 Value: |
| 8707 [ |
| 8708 "ol", |
| 8709 { |
| 8710 "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin
-bottom: 0px;margin-left: 12px;" |
| 8711 }, |
| 8712 [ |
| 8713 "li", |
| 8714 { |
| 8715 "style": "padding-left: 13px;" |
| 8716 }, |
| 8717 [ |
| 8718 "span", |
| 8719 { |
| 8720 "style": "color: rgb(136, 19, 145); margin-right: -13px" |
| 8721 }, |
| 8722 "x: " |
| 8723 ], |
| 8724 [ |
| 8725 "span", |
| 8726 { |
| 8727 "style": "margin-left: 13px" |
| 8728 }, |
| 8729 [ |
| 8730 "object", |
| 8731 { |
| 8732 "object": "<OBJECT>", |
| 8733 "config": { |
| 8734 "name": "none" |
| 8735 } |
| 8736 } |
| 8737 ] |
| 8738 ] |
| 8739 ], |
| 8740 [ |
| 8741 "li", |
| 8742 { |
| 8743 "style": "padding-left: 13px;" |
| 8744 }, |
| 8745 [ |
| 8746 "span", |
| 8747 { |
| 8748 "style": "color: rgb(136, 19, 145); margin-right: -13px" |
| 8749 }, |
| 8750 "[[class]]: " |
| 8751 ], |
| 8752 [ |
| 8753 "span", |
| 8754 { |
| 8755 "style": "margin-left: 13px" |
| 8756 }, |
| 8757 [ |
| 8758 "object", |
| 8759 { |
| 8760 "object": "<OBJECT>", |
| 8761 "config": { |
| 8762 "name": "asClass" |
| 8763 } |
| 8764 } |
| 8765 ] |
| 8766 ] |
| 8767 ] |
| 8768 ] |
| 8769 ----------------------------------- |
| 8770 Test: TestGenericClassJSInterop definition formatting header |
| 8771 Value: |
| 8772 [ |
| 8773 "span", |
| 8774 { |
| 8775 "style": "background-color: #d9edf7;" |
| 8776 }, |
| 8777 "TestGenericClass<JSObject<ExampleJSClass>, int>" |
| 8778 ] |
| 8779 ----------------------------------- |
| 8780 Test: TestGenericClassJSInterop definition formatting body |
| 8781 Value: |
| 8782 [ |
| 8783 "ol", |
| 8784 { |
| 8785 "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin
-bottom: 0px;margin-left: 12px;" |
| 8786 }, |
| 8787 [ |
| 8788 "li", |
| 8789 { |
| 8790 "style": "padding-left: 13px;" |
| 8791 }, |
| 8792 [ |
| 8793 "span", |
| 8794 { |
| 8795 "style": "color: rgb(136, 19, 145); margin-right: -13px" |
| 8796 }, |
| 8797 "[[base class]]: " |
| 8798 ], |
| 8799 [ |
| 8800 "span", |
| 8801 { |
| 8802 "style": "margin-left: 13px" |
| 8803 }, |
| 8804 [ |
| 8805 "object", |
| 8806 { |
| 8807 "object": "<OBJECT>", |
| 8808 "config": { |
| 8809 "name": "asClass" |
| 8810 } |
| 8811 } |
| 8812 ] |
| 8813 ] |
| 8814 ] |
| 8815 ] |
| 8816 ----------------------------------- |
| 8817 |
| OLD | NEW |