OLD | NEW |
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 "vm/dart_api_impl.h" | 5 #include "vm/dart_api_impl.h" |
6 #include "vm/debugger.h" | 6 #include "vm/debugger.h" |
7 #include "vm/unit_test.h" | 7 #include "vm/unit_test.h" |
8 | 8 |
9 namespace dart { | 9 namespace dart { |
10 | 10 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 { | 69 { |
70 JSONArray jsarr(&js); | 70 JSONArray jsarr(&js); |
71 debugger->PrintBreakpointsToJSONArray(&jsarr); | 71 debugger->PrintBreakpointsToJSONArray(&jsarr); |
72 } | 72 } |
73 ExpectSubstringF( | 73 ExpectSubstringF( |
74 js.ToCString(), | 74 js.ToCString(), |
75 "[{\"type\":\"Breakpoint\",\"fixedId\":true,\"id\":\"breakpoints\\/2\"," | 75 "[{\"type\":\"Breakpoint\",\"fixedId\":true,\"id\":\"breakpoints\\/2\"," |
76 "\"breakpointNumber\":2,\"resolved\":false," | 76 "\"breakpointNumber\":2,\"resolved\":false," |
77 "\"location\":{\"type\":\"UnresolvedSourceLocation\"," | 77 "\"location\":{\"type\":\"UnresolvedSourceLocation\"," |
78 "\"script\":{\"type\":\"@Script\",\"fixedId\":true," | 78 "\"script\":{\"type\":\"@Script\",\"fixedId\":true," |
79 "\"id\":\"libraries\\/%" Pd "\\/scripts\\/test-lib\\/0\"," | 79 "\"id\":\"libraries\\/%" Pd |
| 80 "\\/scripts\\/test-lib\\/0\"," |
80 "\"uri\":\"test-lib\"," | 81 "\"uri\":\"test-lib\"," |
81 "\"_kind\":\"script\"},\"line\":3}}," | 82 "\"_kind\":\"script\"},\"line\":3}}," |
82 "{\"type\":\"Breakpoint\",\"fixedId\":true,\"id\":\"breakpoints\\/1\"," | 83 "{\"type\":\"Breakpoint\",\"fixedId\":true,\"id\":\"breakpoints\\/1\"," |
83 "\"breakpointNumber\":1,\"resolved\":false," | 84 "\"breakpointNumber\":1,\"resolved\":false," |
84 "\"location\":{\"type\":\"UnresolvedSourceLocation\"," | 85 "\"location\":{\"type\":\"UnresolvedSourceLocation\"," |
85 "\"script\":{\"type\":\"@Script\",\"fixedId\":true," | 86 "\"script\":{\"type\":\"@Script\",\"fixedId\":true," |
86 "\"id\":\"libraries\\/%" Pd "\\/scripts\\/test-lib\\/0\"," | 87 "\"id\":\"libraries\\/%" Pd |
| 88 "\\/scripts\\/test-lib\\/0\"," |
87 "\"uri\":\"test-lib\"," | 89 "\"uri\":\"test-lib\"," |
88 "\"_kind\":\"script\"},\"line\":2}}]", | 90 "\"_kind\":\"script\"},\"line\":2}}]", |
89 vmlib.index(), vmlib.index()); | 91 vmlib.index(), vmlib.index()); |
90 } | 92 } |
91 } | 93 } |
92 | 94 |
93 | 95 |
94 static bool saw_paused_event = false; | 96 static bool saw_paused_event = false; |
95 | 97 |
96 static void InspectPausedEvent(Dart_IsolateId isolate_id, | 98 static void InspectPausedEvent(Dart_IsolateId isolate_id, |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 EXPECT_VALID(result); | 137 EXPECT_VALID(result); |
136 EXPECT(Dart_IsString(result)); | 138 EXPECT(Dart_IsString(result)); |
137 | 139 |
138 // We ran the code in InspectPausedEvent. | 140 // We ran the code in InspectPausedEvent. |
139 EXPECT(saw_paused_event); | 141 EXPECT(saw_paused_event); |
140 } | 142 } |
141 | 143 |
142 #endif // !PRODUCT | 144 #endif // !PRODUCT |
143 | 145 |
144 } // namespace dart | 146 } // namespace dart |
OLD | NEW |