| OLD | NEW |
| 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 library trydart.incremental_compilation_update_test; | 5 library trydart.incremental_compilation_update_test; |
| 6 | 6 |
| 7 import 'dart:html'; | 7 import 'dart:html'; |
| 8 | 8 |
| 9 import 'dart:async' show | 9 import 'dart:async' show |
| 10 Future; | 10 Future; |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 var instance; | 400 var instance; |
| 401 main() { | 401 main() { |
| 402 if (instance == null) { | 402 if (instance == null) { |
| 403 instance = new C(); | 403 instance = new C(); |
| 404 } | 404 } |
| 405 instance.m(); | 405 instance.m(); |
| 406 } | 406 } |
| 407 """, | 407 """, |
| 408 const <String> ['v2']), | 408 const <String> ['v2']), |
| 409 ], | 409 ], |
| 410 |
| 411 // Test that a newly instantiated class is handled. |
| 412 const <ProgramResult>[ |
| 413 const ProgramResult( |
| 414 """ |
| 415 class A { |
| 416 m() { |
| 417 print('Called A.m'); |
| 418 } |
| 419 } |
| 420 |
| 421 class B { |
| 422 m() { |
| 423 print('Called B.m'); |
| 424 } |
| 425 } |
| 426 |
| 427 var instance; |
| 428 main() { |
| 429 if (instance == null) { |
| 430 instance = new A(); |
| 431 // } else { |
| 432 // instance = new B(); |
| 433 } |
| 434 instance.m(); |
| 435 } |
| 436 """, |
| 437 const <String>['Called A.m']), |
| 438 const ProgramResult( |
| 439 """ |
| 440 class A { |
| 441 m() { |
| 442 print('Called A.m'); |
| 443 } |
| 444 } |
| 445 |
| 446 class B { |
| 447 m() { |
| 448 print('Called B.m'); |
| 449 } |
| 450 } |
| 451 |
| 452 var instance; |
| 453 main() { |
| 454 if (instance == null) { |
| 455 instance = new A(); |
| 456 } else { |
| 457 instance = new B(); |
| 458 } |
| 459 instance.m(); |
| 460 } |
| 461 """, |
| 462 const <String>['Called B.m']), |
| 463 ], |
| 410 ]; | 464 ]; |
| 411 | 465 |
| 412 void main() { | 466 void main() { |
| 413 listener.start(); | 467 listener.start(); |
| 414 | 468 |
| 415 document.head.append(lineNumberStyle()); | 469 document.head.append(lineNumberStyle()); |
| 416 | 470 |
| 417 return asyncTest(() => Future.forEach(tests, compileAndRun)); | 471 return asyncTest(() => Future.forEach(tests, compileAndRun)); |
| 418 } | 472 } |
| 419 | 473 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 position: absolute; | 580 position: absolute; |
| 527 left: 0px; | 581 left: 0px; |
| 528 width: 3em; | 582 width: 3em; |
| 529 text-align: right; | 583 text-align: right; |
| 530 background-color: lightgoldenrodyellow; | 584 background-color: lightgoldenrodyellow; |
| 531 } | 585 } |
| 532 '''); | 586 '''); |
| 533 style.type = 'text/css'; | 587 style.type = 'text/css'; |
| 534 return style; | 588 return style; |
| 535 } | 589 } |
| OLD | NEW |