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 library polymer.test.build.import_inliner_test; | 5 library polymer.test.build.import_inliner_test; |
6 | 6 |
7 import 'package:polymer/src/build/common.dart'; | 7 import 'package:polymer/src/build/common.dart'; |
8 import 'package:polymer/src/build/import_inliner.dart'; | 8 import 'package:polymer/src/build/import_inliner.dart'; |
9 import 'package:unittest/compact_vm_config.dart'; | 9 import 'package:unittest/compact_vm_config.dart'; |
10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 '</head><body>' | 354 '</head><body>' |
355 '<polymer-element>1</polymer-element>' | 355 '<polymer-element>1</polymer-element>' |
356 '<polymer-element>2' | 356 '<polymer-element>2' |
357 '<script type="application/dart" src="s2.dart"></script>' | 357 '<script type="application/dart" src="s2.dart"></script>' |
358 '</polymer-element>' | 358 '</polymer-element>' |
359 '</body></html>', | 359 '</body></html>', |
360 'a|web/test_2.html.scriptUrls': | 360 'a|web/test_2.html.scriptUrls': |
361 '[["a","web/s1.dart"]]', | 361 '[["a","web/s1.dart"]]', |
362 }); | 362 }); |
363 | 363 |
| 364 testPhases('imports with Dart script after JS script', phases, { |
| 365 'a|web/test.html': |
| 366 '<!DOCTYPE html><html><head>' |
| 367 '<link rel="import" href="test_1.html">' |
| 368 '</head></html>', |
| 369 'a|web/test_1.html': |
| 370 '<!DOCTYPE html><html><head>' |
| 371 '<link rel="import" href="test_1.html">' |
| 372 '</head><body>' |
| 373 '<foo>42</foo><bar-baz></bar-baz>' |
| 374 '<polymer-element>1' |
| 375 '<script src="s1.js"></script>' |
| 376 '<script type="application/dart" src="s1.dart"></script>' |
| 377 '</polymer-element>' |
| 378 'FOO</body></html>', |
| 379 }, { |
| 380 'a|web/test.html': |
| 381 '<!DOCTYPE html><html><head>' |
| 382 '</head><body>' |
| 383 '<foo>42</foo><bar-baz></bar-baz>' |
| 384 '<polymer-element>1' |
| 385 '<script src="s1.js"></script>' |
| 386 '</polymer-element>' |
| 387 'FOO</body></html>', |
| 388 'a|web/test.html.scriptUrls': '[["a","web/s1.dart"]]', |
| 389 'a|web/test_1.html': |
| 390 '<!DOCTYPE html><html><head>' |
| 391 '</head><body>' |
| 392 '<foo>42</foo><bar-baz></bar-baz>' |
| 393 '<polymer-element>1' |
| 394 '<script src="s1.js"></script>' |
| 395 '<script type="application/dart" src="s1.dart"></script>' |
| 396 '</polymer-element>' |
| 397 'FOO</body></html>', |
| 398 'a|web/test_1.html.scriptUrls': '[]', |
| 399 }); |
| 400 |
364 testPhases('imports cycle, 2-step lasso', phases, { | 401 testPhases('imports cycle, 2-step lasso', phases, { |
365 'a|web/test.html': | 402 'a|web/test.html': |
366 '<!DOCTYPE html><html><head>' | 403 '<!DOCTYPE html><html><head>' |
367 '<link rel="import" href="test_1.html">' | 404 '<link rel="import" href="test_1.html">' |
368 '</head></html>', | 405 '</head></html>', |
369 'a|web/test_1.html': | 406 'a|web/test_1.html': |
370 '<!DOCTYPE html><html><head>' | 407 '<!DOCTYPE html><html><head>' |
371 '<link rel="import" href="test_2.html">' | 408 '<link rel="import" href="test_2.html">' |
372 '</head><body><polymer-element>1</polymer-element></html>', | 409 '</head><body><polymer-element>1</polymer-element></html>', |
373 'a|web/test_2.html': | 410 'a|web/test_2.html': |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 '<!DOCTYPE html><html><head>' | 495 '<!DOCTYPE html><html><head>' |
459 '</head><body>' | 496 '</head><body>' |
460 '<polymer-element>3</polymer-element>' | 497 '<polymer-element>3</polymer-element>' |
461 '<polymer-element>2</polymer-element></body></html>', | 498 '<polymer-element>2</polymer-element></body></html>', |
462 'a|web/test_3.html': | 499 'a|web/test_3.html': |
463 '<!DOCTYPE html><html><head>' | 500 '<!DOCTYPE html><html><head>' |
464 '</head><body>' | 501 '</head><body>' |
465 '<polymer-element>3</polymer-element></body></html>', | 502 '<polymer-element>3</polymer-element></body></html>', |
466 }); | 503 }); |
467 } | 504 } |
OLD | NEW |