OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 /// Integration test that runs the incremental compiler, runs the compiled | 5 /// Integration test that runs the incremental compiler, runs the compiled |
6 /// program, incrementally rebuild portions of the app, and triggers a hot | 6 /// program, incrementally rebuild portions of the app, and triggers a hot |
7 /// reload on the running program. | 7 /// reload on the running program. |
8 library front_end.incremental.hot_reload_e2e_test; | 8 library front_end.incremental.hot_reload_e2e_test; |
9 | 9 |
10 import 'dart:async'; | 10 import 'dart:async'; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 test('reload after non-leaf library modification', () async { | 130 test('reload after non-leaf library modification', () async { |
131 await startProgram(1); | 131 await startProgram(1); |
132 expect(await lines[1], "part1 part2"); | 132 expect(await lines[1], "part1 part2"); |
133 | 133 |
134 writeFile(fs, 'a.dart', sourceA.replaceAll("part2", "part4")); | 134 writeFile(fs, 'a.dart', sourceA.replaceAll("part2", "part4")); |
135 await rebuild(compiler, outputUri); | 135 await rebuild(compiler, outputUri); |
136 await hotReload(); | 136 await hotReload(); |
137 await programIsDone; | 137 await programIsDone; |
138 expect(await lines[2], "part1 part4"); | 138 expect(await lines[2], "part1 part4"); |
139 }, skip: true /* VM crashes on reload */); | 139 }); |
140 | 140 |
141 test('reload after whole program modification', () async { | 141 test('reload after whole program modification', () async { |
142 await startProgram(1); | 142 await startProgram(1); |
143 expect(await lines[1], "part1 part2"); | 143 expect(await lines[1], "part1 part2"); |
144 | 144 |
145 writeFile(fs, 'b.dart', sourceB.replaceAll("part1", "part5")); | 145 writeFile(fs, 'b.dart', sourceB.replaceAll("part1", "part5")); |
146 writeFile(fs, 'a.dart', sourceA.replaceAll("part2", "part6")); | 146 writeFile(fs, 'a.dart', sourceA.replaceAll("part2", "part6")); |
147 await rebuild(compiler, outputUri); | 147 await rebuild(compiler, outputUri); |
148 await hotReload(); | 148 await hotReload(); |
149 await programIsDone; | 149 await programIsDone; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 f() => "$line part2"; | 242 f() => "$line part2"; |
243 '''; | 243 '''; |
244 | 244 |
245 const sourceB = r''' | 245 const sourceB = r''' |
246 get line => "part1"; | 246 get line => "part1"; |
247 '''; | 247 '''; |
248 | 248 |
249 RegExp observatoryPortRegExp = | 249 RegExp observatoryPortRegExp = |
250 new RegExp("Observatory listening on http://127.0.0.1:\([0-9]*\)/"); | 250 new RegExp("Observatory listening on http://127.0.0.1:\([0-9]*\)/"); |
OLD | NEW |