diff --git a/.gitignore b/.gitignore index 994b4842d9..d165a4f95d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,8 @@ -# Files and directories created by pub +# Ignore artifacts generated by "pub". .packages -.pub/ -packages +/*/build +.pub pubspec.lock -# Created by pkg/build_runner +# Files generated by dart tools. .dart_tool - -# Directory created by dartdoc -doc/api/ - - -# Files generated by dart test/source_gen/template_compiler/generate.dart -test/source_gen/template_compiler/test_files/**/*.template_*.dart diff --git a/.travis.yml b/.travis.yml index 746f4042b0..dc5f6ab5e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,23 +4,4 @@ dart: - dev - stable - 1.23.0 -addons: - # otherwise a number of tests in test/security/html_sanitizer_test.dart fail - firefox: "latest" -before_script: ./tool/travis_before_script.sh -dart_task: - - test: -P travis -p vm - xvfb: false - # Disable parallelism on Firefox (-j 1) - # Causes flakiness – need to investigate - - test: -P travis -p firefox -j 1 - - test: -P travis -p dartium - install_dartium: true - - dartfmt - # Treat warnings in lib directory as fatal - - dartanalyzer: --fatal-warnings . - # TODO(kevmoo) Enable codegen tests when issue is fixed - # https://github.com/dart-lang/angular2/issues/272 -cache: - directories: - - $HOME/.pub-cache +script: ./tool/travis.sh diff --git a/AUTHORS b/AUTHORS index 215e642452..bf4f161c2d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,5 +1,5 @@ # Below is a list of people and organizations that have contributed to the -# Angular 2 Dart project. Names should be added to the list like so: +# AngularDart project. Names should be added to the list like so: # # Name/Organization diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b67d2dd84b..b4fda83130 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ ## Got a Question or Problem? -If you have questions about how to *use* Angular, please direct them to the +If you have questions about how to *use* AngularDart, please direct them to the [Dart Web Group][web-group] discussion list or [Stack Overflow][stack-overflow]. ## Found an Issue? @@ -82,8 +82,8 @@ quick process, we promise! [web-group]: https://groups.google.com/a/dartlang.org/forum/#!forum/web [corporate-cla]: http://code.google.com/legal/corporate-cla-v1.0.html -[github]: https://github.com/dart-lang/angular2 -[github-new-issue]: https://github.com/dart-lang/angular2/issues/new -[github-pulls]: https://github.com/dart-lang/angular2/pulls +[github]: https://github.com/dart-lang/angular +[github-new-issue]: https://github.com/dart-lang/angular/issues/new +[github-pulls]: https://github.com/dart-lang/angular/pulls [individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html [stack-overflow]: https://stackoverflow.com/questions/tagged/angular-dart diff --git a/README.md b/README.md index 1183bc169b..18c0f02451 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,4 @@ -![AngularDart](https://raw.githubusercontent.com/dart-lang/logos/master/logos_and_wordmarks/angulardart-logo.png) - -[AngularDart][angular_dart] is a productive web application framework that -powers some of Google's most critical applications. +# AngularDart @@ -9,57 +6,25 @@ powers some of Google's most critical applications. [![Build Status](https://travis-ci.org/dart-lang/angular2.svg?branch=master)](https://travis-ci.org/dart-lang/angular2) [![Gitter](https://img.shields.io/gitter/room/dart-lang/angular2.svg)](https://gitter.im/dart-lang/angular2) -It's built on [Dart][dart_web] and is used extensively by Google -[AdWords][ad_words], [AdSense][ad_sense], [Fiber][fiber], and much much more! - -[![Built with AngularDart](https://2.bp.blogspot.com/-T50YZP5hlW4/Vv07k1PPVmI/AAAAAAAAM_Q/kVo8eImMOFUWLYqXg_xGzaWPvvlO7lhng/s0/adwords-dart.png)][ad_words] - -## Overview - - * [Pub package][pub] - * [Source code](https://github.com/dart-lang/angular2) - * [Issues](https://github.com/dart-lang/angular2/issues) - * [Mailing List](https://groups.google.com/a/dartlang.org/forum/#!forum/web) - * [Documentation][angular_dart] - * [Contributor guidelines][contribute] - * [Logo](https://raw.githubusercontent.com/dart-lang/logos/master/logos_and_wordmarks/angulardart-logo.svg) +AngularDart is a fast and productive web framework provided by [Dart][]. -[ad_sense]: http://news.dartlang.org/2016/10/google-adsense-angular-dart.html -[ad_words]: http://news.dartlang.org/2016/03/the-new-adwords-ui-uses-dart-we-asked.html -[fiber]: http://news.dartlang.org/2015/11/how-google-uses-angular-2-with-dart.html -[angular_dart]: https://webdev.dartlang.org/angular -[dart_web]: https://webdev.dartlang.org/ -[pub]: https://pub.dartlang.org/packages/angular2 -[contribute]: https://github.com/dart-lang/angular2/blob/master/CONTRIBUTING.md - -## Examples +[Dart]: https://webdev.dartlang.org/angular/ -Is this your first time using AngularDart? +![AdWords is written in AngularDart](https://webdev.dartlang.org/angular/images/Google-AdWords-Next-Interface-800x342.png) -* Start with a [tutorial][tutorial] to build a fully working application, - including routing, HTTP networking, and more. +--- -* Next, try a [code-lab on writing material design applications][code_lab], - which uses the [`angular_components`](https://webdev.dartlang.org/components) - package for production-quality material design widgets built and used by - Google. +## Packages -You may also be interested in a set of [community contributed tutorials][comm]. +This repository is the home of a set of packages for AngularDart: -[tutorial]: https://webdev.dartlang.org/angular/tutorial -[code_lab]: https://codelabs.developers.google.com/codelabs/your-first-angulardart-web-app/ -[comm]: https://dart.academy/tag/angular2/ +### [angular](angular/README.md) -## Installation +The web framework. -AngularDart is available as the `angular2` package on [pub][]. We recommend -following our [tutorial][] to get started. +### [angular_test](angular_test/README.md) -> For historic reasons, this package is called `angular2`, instead of an older -> implementation called `angular`. We hope to rename this package to avoid -> confusion in the near future - [track our progress][track_rename]. - -[track_rename]: https://github.com/dart-lang/angular2/issues/78 +High-level but optional testing API. ## Contributing @@ -69,3 +34,4 @@ Please read and agree to our [contribution guidelines][contribute]. We sync internally periodically, and test against thousands of component and e2e tests so please excuse small delays in merging pull requests. +[contribute]: https://github.com/dart-lang/angular2/blob/master/CONTRIBUTING.md diff --git a/_tests/pubspec.yaml b/_tests/pubspec.yaml new file mode 100644 index 0000000000..651ef94e6f --- /dev/null +++ b/_tests/pubspec.yaml @@ -0,0 +1,20 @@ +name: _tests +version: 0.0.1 +author: Dart Team +description: Tests for the angular web framework. +homepage: https://webdev.dartlang.org/angular +documentation: https://webdev.dartlang.org/angular/api +environment: + sdk: '>=1.23.0 <2.0.0' +dependencies: + angular: 4.0.0-dev + angular_test: '^1.0.0-beta' + build_runner: ^0.3.4 + build_test: ^0.6.0 + mockito: '>=0.11.0 <3.0.0' + test: ^0.12.6 +dependency_overrides: + angular: + path: ../angular + angular_test: + path: ../angular_test diff --git a/test/analyzer_util.dart b/_tests/test/analyzer_util.dart similarity index 100% rename from test/analyzer_util.dart rename to _tests/test/analyzer_util.dart diff --git a/test/api_test.dart b/_tests/test/api_test.dart similarity index 95% rename from test/api_test.dart rename to _tests/test/api_test.dart index 43c8ade604..24f55e386f 100644 --- a/test/api_test.dart +++ b/_tests/test/api_test.dart @@ -1,3 +1,4 @@ +@Skip('Test broken by package refactoring. See issue #466') @TestOn('!browser') import 'package:analyzer/dart/element/element.dart'; diff --git a/test/common/control_mocks.dart b/_tests/test/common/control_mocks.dart similarity index 86% rename from test/common/control_mocks.dart rename to _tests/test/common/control_mocks.dart index 02f1effb53..ab49e4a17d 100644 --- a/test/common/control_mocks.dart +++ b/_tests/test/common/control_mocks.dart @@ -1,5 +1,5 @@ -import 'package:angular2/angular2.dart'; import 'package:mockito/mockito.dart'; +import 'package:angular/angular.dart'; @proxy class MockNgControl extends Mock implements NgControl {} diff --git a/test/common/directives/for_test.dart b/_tests/test/common/directives/for_test.dart similarity index 99% rename from test/common/directives/for_test.dart rename to _tests/test/common/directives/for_test.dart index 90d271cec8..f3ef718d11 100644 --- a/test/common/directives/for_test.dart +++ b/_tests/test/common/directives/for_test.dart @@ -3,10 +3,11 @@ library angular2.test.common.directives.for_test; import 'dart:html'; -import 'package:angular2/angular2.dart'; -import "package:angular2/src/testing/internal.dart"; + import 'package:angular_test/angular_test.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; +import "package:angular/src/testing/internal.dart"; void main() { group('ngFor', () { diff --git a/test/common/directives/if_test.dart b/_tests/test/common/directives/if_test.dart similarity index 99% rename from test/common/directives/if_test.dart rename to _tests/test/common/directives/if_test.dart index 885c20c1f9..9b71be4cb2 100644 --- a/test/common/directives/if_test.dart +++ b/_tests/test/common/directives/if_test.dart @@ -4,9 +4,9 @@ library angular2.test.common.directives.if_test; import 'dart:html'; -import 'package:angular2/angular2.dart'; import 'package:angular_test/angular_test.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; void main() { group('ngIf', () { diff --git a/test/common/directives/ng_class_test.dart b/_tests/test/common/directives/ng_class_test.dart similarity index 99% rename from test/common/directives/ng_class_test.dart rename to _tests/test/common/directives/ng_class_test.dart index 75361d987f..37cb8e43c1 100644 --- a/test/common/directives/ng_class_test.dart +++ b/_tests/test/common/directives/ng_class_test.dart @@ -1,9 +1,9 @@ @Tags(const ['codegen']) @TestOn('browser') -import 'package:angular2/angular2.dart'; import 'package:angular_test/angular_test.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; void main() { group('ngClass', () { diff --git a/test/common/directives/ng_style_test.dart b/_tests/test/common/directives/ng_style_test.dart similarity index 98% rename from test/common/directives/ng_style_test.dart rename to _tests/test/common/directives/ng_style_test.dart index 2c948a1f93..ec52876156 100644 --- a/test/common/directives/ng_style_test.dart +++ b/_tests/test/common/directives/ng_style_test.dart @@ -1,9 +1,9 @@ @Tags(const ['codegen']) @TestOn('browser') -import 'package:angular2/angular2.dart'; import 'package:angular_test/angular_test.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; void main() { group('ngStyle', () { diff --git a/test/common/directives/ng_switch_test.dart b/_tests/test/common/directives/ng_switch_test.dart similarity index 99% rename from test/common/directives/ng_switch_test.dart rename to _tests/test/common/directives/ng_switch_test.dart index 459bf56892..385657725d 100644 --- a/test/common/directives/ng_switch_test.dart +++ b/_tests/test/common/directives/ng_switch_test.dart @@ -1,9 +1,9 @@ @Tags(const ['codegen']) @TestOn('browser') -import 'package:angular2/angular2.dart'; import 'package:angular_test/angular_test.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; void main() { group('ngSwitch', () { diff --git a/test/common/directives/ng_template_outlet_test.dart b/_tests/test/common/directives/ng_template_outlet_test.dart similarity index 95% rename from test/common/directives/ng_template_outlet_test.dart rename to _tests/test/common/directives/ng_template_outlet_test.dart index 4db6e057a1..c6e304fdc5 100644 --- a/test/common/directives/ng_template_outlet_test.dart +++ b/_tests/test/common/directives/ng_template_outlet_test.dart @@ -4,13 +4,13 @@ library angular2.test.common.directives.ng_template_outlet_test; import 'dart:html'; -import 'package:angular2/angular2.dart'; -import "package:angular2/src/common/directives/ng_template_outlet.dart" - show NgTemplateOutlet; -import 'package:angular2/src/debug/debug_node.dart'; -import 'package:angular2/src/testing/matchers.dart'; import 'package:angular_test/angular_test.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; +import "package:angular/src/common/directives/ng_template_outlet.dart" + show NgTemplateOutlet; +import 'package:angular/src/debug/debug_node.dart'; +import 'package:angular/src/testing/matchers.dart'; void main() { group("insert", () { diff --git a/test/common/directives/non_bindable_test.dart b/_tests/test/common/directives/non_bindable_test.dart similarity index 97% rename from test/common/directives/non_bindable_test.dart rename to _tests/test/common/directives/non_bindable_test.dart index 0a868d4f78..2d35949258 100644 --- a/test/common/directives/non_bindable_test.dart +++ b/_tests/test/common/directives/non_bindable_test.dart @@ -3,9 +3,9 @@ import 'dart:html'; -import 'package:angular2/angular2.dart'; import 'package:angular_test/angular_test.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; void main() { group('ngNonBindable', () { diff --git a/test/common/forms/accessor_test.dart b/_tests/test/common/forms/accessor_test.dart similarity index 96% rename from test/common/forms/accessor_test.dart rename to _tests/test/common/forms/accessor_test.dart index 9c25a4b47f..6d09fe3822 100644 --- a/test/common/forms/accessor_test.dart +++ b/_tests/test/common/forms/accessor_test.dart @@ -4,10 +4,10 @@ library angular2.test.common.forms.accessor_test; import 'dart:js_util' as js_util; -import 'package:angular2/angular2.dart'; -import 'package:angular2/src/common/forms/directives/control_value_accessor.dart'; import 'package:angular_test/angular_test.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; +import 'package:angular/src/common/forms/directives/control_value_accessor.dart'; void main() { group('accessor test', () { diff --git a/test/common/forms/directives_test.dart b/_tests/test/common/forms/directives_test.dart similarity index 98% rename from test/common/forms/directives_test.dart rename to _tests/test/common/forms/directives_test.dart index 897a3363b1..2e8cde2c92 100644 --- a/test/common/forms/directives_test.dart +++ b/_tests/test/common/forms/directives_test.dart @@ -1,12 +1,12 @@ @TestOn('browser') import 'dart:html'; -import 'package:angular2/angular2.dart'; -import 'package:angular2/src/common/forms/directives/shared.dart' - show selectValueAccessor, composeValidators; -import 'package:angular2/src/testing/internal.dart'; import 'package:mockito/mockito.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; +import 'package:angular/src/common/forms/directives/shared.dart' + show selectValueAccessor, composeValidators; +import 'package:angular/src/testing/internal.dart'; import '../../test_util.dart'; import '../control_mocks.dart'; diff --git a/test/common/forms/form_builder_test.dart b/_tests/test/common/forms/form_builder_test.dart similarity index 97% rename from test/common/forms/form_builder_test.dart rename to _tests/test/common/forms/form_builder_test.dart index b7ce38a635..07cc992772 100644 --- a/test/common/forms/form_builder_test.dart +++ b/_tests/test/common/forms/form_builder_test.dart @@ -1,6 +1,6 @@ @TestOn('browser') -import 'package:angular2/angular2.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; Map _syncValidator(AbstractControl c) { return null; diff --git a/test/common/forms/integration_test.dart b/_tests/test/common/forms/integration_test.dart similarity index 99% rename from test/common/forms/integration_test.dart rename to _tests/test/common/forms/integration_test.dart index 1199f19865..ee52615bcd 100644 --- a/test/common/forms/integration_test.dart +++ b/_tests/test/common/forms/integration_test.dart @@ -3,11 +3,11 @@ import 'dart:async'; import 'dart:html'; -import 'package:angular2/angular2.dart'; -import 'package:angular2/src/debug/debug_node.dart'; -import 'package:angular2/src/testing/utils.dart'; import 'package:angular_test/angular_test.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; +import 'package:angular/src/debug/debug_node.dart'; +import 'package:angular/src/testing/utils.dart'; void main() { group('ngForm', () { diff --git a/test/common/forms/model_test.dart b/_tests/test/common/forms/model_test.dart similarity index 99% rename from test/common/forms/model_test.dart rename to _tests/test/common/forms/model_test.dart index c006c4a14c..025105d246 100644 --- a/test/common/forms/model_test.dart +++ b/_tests/test/common/forms/model_test.dart @@ -1,8 +1,8 @@ @Tags(const ['codegen']) @TestOn('browser') -import 'package:angular2/angular2.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; void main() { group('Form Model', () { diff --git a/test/common/forms/ng_control_repeated_test.dart b/_tests/test/common/forms/ng_control_repeated_test.dart similarity index 96% rename from test/common/forms/ng_control_repeated_test.dart rename to _tests/test/common/forms/ng_control_repeated_test.dart index b1d5e440f0..e5abb4ffba 100644 --- a/test/common/forms/ng_control_repeated_test.dart +++ b/_tests/test/common/forms/ng_control_repeated_test.dart @@ -2,9 +2,9 @@ @TestOn('browser') import 'dart:async'; -import 'package:angular2/angular2.dart'; import 'package:angular_test/angular_test.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; void main() { tearDown(disposeAnyRunningTest); diff --git a/test/common/forms/validators_test.dart b/_tests/test/common/forms/validators_test.dart similarity index 98% rename from test/common/forms/validators_test.dart rename to _tests/test/common/forms/validators_test.dart index a553508fe0..44c8feb784 100644 --- a/test/common/forms/validators_test.dart +++ b/_tests/test/common/forms/validators_test.dart @@ -1,6 +1,6 @@ @TestOn('browser') -import 'package:angular2/angular2.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; void main() { var validator = (String key, dynamic error) { diff --git a/test/common/pipes/async_pipe_test.dart b/_tests/test/common/pipes/async_pipe_test.dart similarity index 99% rename from test/common/pipes/async_pipe_test.dart rename to _tests/test/common/pipes/async_pipe_test.dart index 3b5cceb540..835cedb88b 100644 --- a/test/common/pipes/async_pipe_test.dart +++ b/_tests/test/common/pipes/async_pipe_test.dart @@ -2,9 +2,9 @@ import 'dart:async'; -import 'package:angular2/angular2.dart'; import 'package:mockito/mockito.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; import '../../test_util.dart'; import '../control_mocks.dart'; diff --git a/test/common/pipes/date_pipe_test.dart b/_tests/test/common/pipes/date_pipe_test.dart similarity index 98% rename from test/common/pipes/date_pipe_test.dart rename to _tests/test/common/pipes/date_pipe_test.dart index 76cee8fc34..f93f115bac 100644 --- a/test/common/pipes/date_pipe_test.dart +++ b/_tests/test/common/pipes/date_pipe_test.dart @@ -1,7 +1,7 @@ @TestOn('browser') -import 'package:angular2/angular2.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; void main() { group('DatePipe', () { diff --git a/test/common/pipes/json_pipe_test.dart b/_tests/test/common/pipes/json_pipe_test.dart similarity index 98% rename from test/common/pipes/json_pipe_test.dart rename to _tests/test/common/pipes/json_pipe_test.dart index 20dc17b8f2..baece016a2 100644 --- a/test/common/pipes/json_pipe_test.dart +++ b/_tests/test/common/pipes/json_pipe_test.dart @@ -2,9 +2,9 @@ @Tags(const ['codegen']) import 'dart:convert'; -import 'package:angular2/angular2.dart'; import 'package:angular_test/angular_test.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; void main() { group('JsonPipe', () { diff --git a/test/common/pipes/lowercase_pipe_test.dart b/_tests/test/common/pipes/lowercase_pipe_test.dart similarity index 92% rename from test/common/pipes/lowercase_pipe_test.dart rename to _tests/test/common/pipes/lowercase_pipe_test.dart index e8589687b3..0ec65d6328 100644 --- a/test/common/pipes/lowercase_pipe_test.dart +++ b/_tests/test/common/pipes/lowercase_pipe_test.dart @@ -1,5 +1,5 @@ -import "package:angular2/src/common/pipes/lowercase_pipe.dart"; import 'package:test/test.dart'; +import "package:angular/src/common/pipes/lowercase_pipe.dart"; import '../../test_util.dart'; diff --git a/test/common/pipes/number_pipe_test.dart b/_tests/test/common/pipes/number_pipe_test.dart similarity index 96% rename from test/common/pipes/number_pipe_test.dart rename to _tests/test/common/pipes/number_pipe_test.dart index 1adce1e3bf..d427bf58e7 100644 --- a/test/common/pipes/number_pipe_test.dart +++ b/_tests/test/common/pipes/number_pipe_test.dart @@ -1,5 +1,5 @@ -import "package:angular2/src/common/pipes/number_pipe.dart"; import 'package:test/test.dart'; +import "package:angular/src/common/pipes/number_pipe.dart"; import '../../test_util.dart'; diff --git a/test/common/pipes/replace_pipe_test.dart b/_tests/test/common/pipes/replace_pipe_test.dart similarity index 97% rename from test/common/pipes/replace_pipe_test.dart rename to _tests/test/common/pipes/replace_pipe_test.dart index 2c3c8f0fc5..d41f7a40e1 100644 --- a/test/common/pipes/replace_pipe_test.dart +++ b/_tests/test/common/pipes/replace_pipe_test.dart @@ -1,5 +1,5 @@ -import "package:angular2/src/common/pipes/replace_pipe.dart"; import 'package:test/test.dart'; +import "package:angular/src/common/pipes/replace_pipe.dart"; import '../../test_util.dart'; diff --git a/test/common/pipes/slice_pipe_test.dart b/_tests/test/common/pipes/slice_pipe_test.dart similarity index 97% rename from test/common/pipes/slice_pipe_test.dart rename to _tests/test/common/pipes/slice_pipe_test.dart index ffe1a58745..43f637505c 100644 --- a/test/common/pipes/slice_pipe_test.dart +++ b/_tests/test/common/pipes/slice_pipe_test.dart @@ -2,10 +2,10 @@ @Tags(const ['codegen']) library angular2.test.common.pipes.slice_pipe_test; -import 'package:angular2/angular2.dart'; -import "package:angular2/src/testing/internal.dart"; import 'package:angular_test/angular_test.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; +import "package:angular/src/testing/internal.dart"; void main() { group('SlicePipe', () { diff --git a/test/common/pipes/uppercase_pipe_test.dart b/_tests/test/common/pipes/uppercase_pipe_test.dart similarity index 92% rename from test/common/pipes/uppercase_pipe_test.dart rename to _tests/test/common/pipes/uppercase_pipe_test.dart index 5f6cf1bae3..986eaf714e 100644 --- a/test/common/pipes/uppercase_pipe_test.dart +++ b/_tests/test/common/pipes/uppercase_pipe_test.dart @@ -1,5 +1,5 @@ -import "package:angular2/src/common/pipes/uppercase_pipe.dart"; import 'package:test/test.dart'; +import "package:angular/src/common/pipes/uppercase_pipe.dart"; import '../../test_util.dart'; diff --git a/test/compiler/compile_metadata_test.dart b/_tests/test/compiler/compile_metadata_test.dart similarity index 95% rename from test/compiler/compile_metadata_test.dart rename to _tests/test/compiler/compile_metadata_test.dart index efab7abec4..11d74f9d88 100644 --- a/test/compiler/compile_metadata_test.dart +++ b/_tests/test/compiler/compile_metadata_test.dart @@ -1,12 +1,12 @@ library angular2.test.compiler.compile_metadata_test; -import "package:angular2/src/compiler/compile_metadata.dart"; -import "package:angular2/src/core/change_detection.dart" +import 'package:test/test.dart'; +import "package:angular/src/compiler/compile_metadata.dart"; +import "package:angular/src/core/change_detection.dart" show ChangeDetectionStrategy; -import "package:angular2/src/core/metadata/lifecycle_hooks.dart" +import "package:angular/src/core/metadata/lifecycle_hooks.dart" show LifecycleHooks; -import "package:angular2/src/core/metadata/view.dart" show ViewEncapsulation; -import 'package:test/test.dart'; +import "package:angular/src/core/metadata/view.dart" show ViewEncapsulation; void main() { group("CompileMetadata", () { diff --git a/test/compiler/directive_lifecycle_test.dart b/_tests/test/compiler/directive_lifecycle_test.dart similarity index 96% rename from test/compiler/directive_lifecycle_test.dart rename to _tests/test/compiler/directive_lifecycle_test.dart index 4a36793a12..3d434de8ce 100644 --- a/test/compiler/directive_lifecycle_test.dart +++ b/_tests/test/compiler/directive_lifecycle_test.dart @@ -1,10 +1,10 @@ @TestOn('browser && !js') library angular2.test.core.compiler.directive_lifecycle_test; -import 'package:angular2/src/compiler/directive_lifecycle_reflector.dart'; -import 'package:angular2/src/core/metadata/lifecycle_hooks.dart'; -import 'package:angular2/src/testing/internal.dart'; import 'package:test/test.dart'; +import 'package:angular/src/compiler/directive_lifecycle_reflector.dart'; +import 'package:angular/src/core/metadata/lifecycle_hooks.dart'; +import 'package:angular/src/testing/internal.dart'; void main() { group('Directive lifecycle', () { diff --git a/test/compiler/directive_normalizer_test.dart b/_tests/test/compiler/directive_normalizer_test.dart similarity index 95% rename from test/compiler/directive_normalizer_test.dart rename to _tests/test/compiler/directive_normalizer_test.dart index 75c466a771..463156dc14 100644 --- a/test/compiler/directive_normalizer_test.dart +++ b/_tests/test/compiler/directive_normalizer_test.dart @@ -3,17 +3,17 @@ import 'dart:async'; -import 'package:angular2/angular2.dart'; -import 'package:angular2/src/compiler/compile_metadata.dart' - show CompileTypeMetadata, CompileTemplateMetadata; -import 'package:angular2/src/compiler/directive_normalizer.dart' - show DirectiveNormalizer; -import 'package:angular2/src/compiler/html_parser.dart'; -import 'package:angular2/src/compiler/xhr.dart' show XHR; -import 'package:angular2/src/compiler/xhr_mock.dart' show MockXHR; -import 'package:angular2/src/core/metadata/view.dart' show ViewEncapsulation; import 'package:angular_test/angular_test.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; +import 'package:angular/src/compiler/compile_metadata.dart' + show CompileTypeMetadata, CompileTemplateMetadata; +import 'package:angular/src/compiler/directive_normalizer.dart' + show DirectiveNormalizer; +import 'package:angular/src/compiler/html_parser.dart'; +import 'package:angular/src/compiler/xhr.dart' show XHR; +import 'package:angular/src/compiler/xhr_mock.dart' show MockXHR; +import 'package:angular/src/core/metadata/view.dart' show ViewEncapsulation; import '../test_util.dart'; import 'test_bindings.dart' show TEST_PROVIDERS; @@ -366,15 +366,14 @@ void main() { }); } -@Component( - selector: 'test', - template: '', - providers: const [TEST_PROVIDERS, DirectiveNormalizer, HtmlParser]) +@Component(selector: 'test', template: '', providers: const [TEST_PROVIDERS]) class DirectiveNormalizerTest { final DirectiveNormalizer directiveNormalizer; final XHR xhr; - DirectiveNormalizerTest(this.directiveNormalizer, this.xhr); + DirectiveNormalizerTest(this.xhr, UrlResolver urlResolver) + : directiveNormalizer = + new DirectiveNormalizer(xhr, urlResolver, new HtmlParser()); } Future getNormalizer() async { diff --git a/test/compiler/directive_resolver_test.dart b/_tests/test/compiler/directive_resolver_test.dart similarity index 97% rename from test/compiler/directive_resolver_test.dart rename to _tests/test/compiler/directive_resolver_test.dart index 2b7365cbb3..abd1287ebf 100644 --- a/test/compiler/directive_resolver_test.dart +++ b/_tests/test/compiler/directive_resolver_test.dart @@ -1,11 +1,11 @@ @TestOn('browser') library angular2.test.compiler.directive_resolver_test; -import 'package:angular2/src/compiler/directive_resolver.dart' - show DirectiveResolver; -import 'package:angular2/src/core/metadata.dart'; -import 'package:angular2/src/testing/internal.dart'; import 'package:test/test.dart'; +import 'package:angular/src/compiler/directive_resolver.dart' + show DirectiveResolver; +import 'package:angular/src/core/metadata.dart'; +import 'package:angular/src/testing/internal.dart'; import "../test_util.dart"; diff --git a/test/compiler/exports_statics.dart b/_tests/test/compiler/exports_statics.dart similarity index 100% rename from test/compiler/exports_statics.dart rename to _tests/test/compiler/exports_statics.dart diff --git a/test/compiler/exports_test.dart b/_tests/test/compiler/exports_test.dart similarity index 99% rename from test/compiler/exports_test.dart rename to _tests/test/compiler/exports_test.dart index 6155d42bc4..fa02182e9d 100644 --- a/test/compiler/exports_test.dart +++ b/_tests/test/compiler/exports_test.dart @@ -1,12 +1,12 @@ @Tags(const ['codegen']) @TestOn('browser') -import 'package:angular2/angular2.dart'; -import 'package:test/test.dart'; import 'package:angular_test/angular_test.dart'; +import 'package:test/test.dart'; +import 'package:angular/angular.dart'; -import 'exports_statics.dart'; import 'exports_statics.dart' as lib; +import 'exports_statics.dart'; void main() { group('exports', () { diff --git a/test/compiler/expression_parser/lexer_test.dart b/_tests/test/compiler/expression_parser/lexer_test.dart similarity index 99% rename from test/compiler/expression_parser/lexer_test.dart rename to _tests/test/compiler/expression_parser/lexer_test.dart index 25e471cb0c..672f6cac7f 100644 --- a/test/compiler/expression_parser/lexer_test.dart +++ b/_tests/test/compiler/expression_parser/lexer_test.dart @@ -1,9 +1,9 @@ @TestOn('browser') library angular2.test.compiler.expression_parser.lexer_test; -import "package:angular2/src/compiler/expression_parser/lexer.dart" - show Lexer, Token; import "package:test/test.dart"; +import "package:angular/src/compiler/expression_parser/lexer.dart" + show Lexer, Token; import "../../test_util.dart"; diff --git a/test/compiler/expression_parser/parser_test.dart b/_tests/test/compiler/expression_parser/parser_test.dart similarity index 98% rename from test/compiler/expression_parser/parser_test.dart rename to _tests/test/compiler/expression_parser/parser_test.dart index 4fc21269fa..ced7850089 100644 --- a/test/compiler/expression_parser/parser_test.dart +++ b/_tests/test/compiler/expression_parser/parser_test.dart @@ -1,12 +1,11 @@ @TestOn('browser') library angular2.test.compiler.expression_parser.parser_test; -import "package:angular2/src/compiler/expression_parser/ast.dart" - show BindingPipe, AST; -import "package:angular2/src/compiler/expression_parser/lexer.dart" show Lexer; -import "package:angular2/src/compiler/expression_parser/parser.dart" - show Parser; import "package:test/test.dart"; +import "package:angular/src/compiler/expression_parser/ast.dart" + show BindingPipe, AST; +import "package:angular/src/compiler/expression_parser/lexer.dart" show Lexer; +import "package:angular/src/compiler/expression_parser/parser.dart" show Parser; import "../../test_util.dart"; import "unparser.dart" show Unparser; diff --git a/test/compiler/expression_parser/unparser.dart b/_tests/test/compiler/expression_parser/unparser.dart similarity index 98% rename from test/compiler/expression_parser/unparser.dart rename to _tests/test/compiler/expression_parser/unparser.dart index d0245b509e..ce94e7ae0c 100644 --- a/test/compiler/expression_parser/unparser.dart +++ b/_tests/test/compiler/expression_parser/unparser.dart @@ -1,6 +1,6 @@ library angular2.test.compiler.expression_parser.unparser; -import "package:angular2/src/compiler/expression_parser/ast.dart"; +import "package:angular/src/compiler/expression_parser/ast.dart"; class Unparser implements AstVisitor { static final _quoteRegExp = new RegExp(r'"'); diff --git a/test/compiler/html_ast_spec_utils.dart b/_tests/test/compiler/html_ast_spec_utils.dart similarity index 92% rename from test/compiler/html_ast_spec_utils.dart rename to _tests/test/compiler/html_ast_spec_utils.dart index a7954aa25b..025de57ecc 100644 --- a/test/compiler/html_ast_spec_utils.dart +++ b/_tests/test/compiler/html_ast_spec_utils.dart @@ -1,6 +1,7 @@ library angular2.test.compiler.html_ast_spec_utils; -import "package:angular2/src/compiler/html_ast.dart" +import 'package:source_span/source_span.dart'; +import "package:angular/src/compiler/html_ast.dart" show HtmlAst, HtmlAstVisitor, @@ -9,10 +10,8 @@ import "package:angular2/src/compiler/html_ast.dart" HtmlTextAst, HtmlCommentAst, htmlVisitAll; -import "package:angular2/src/compiler/html_parser.dart" - show HtmlParseTreeResult; -import "package:angular2/src/facade/exceptions.dart" show BaseException; -import 'package:source_span/source_span.dart'; +import "package:angular/src/compiler/html_parser.dart" show HtmlParseTreeResult; +import "package:angular/src/facade/exceptions.dart" show BaseException; List humanizeDom(HtmlParseTreeResult parseResult) { if (parseResult.errors.length > 0) { diff --git a/test/compiler/html_lexer_test.dart b/_tests/test/compiler/html_lexer_test.dart similarity index 99% rename from test/compiler/html_lexer_test.dart rename to _tests/test/compiler/html_lexer_test.dart index c608404027..4278a158a0 100644 --- a/test/compiler/html_lexer_test.dart +++ b/_tests/test/compiler/html_lexer_test.dart @@ -1,10 +1,10 @@ library angular2.test.compiler.html_lexer_test; -import "package:angular2/src/compiler/html_lexer.dart" - show tokenizeHtml, HtmlToken, HtmlTokenType, HtmlTokenError; -import "package:angular2/src/facade/exceptions.dart" show BaseException; import 'package:source_span/source_span.dart'; import 'package:test/test.dart'; +import "package:angular/src/compiler/html_lexer.dart" + show tokenizeHtml, HtmlToken, HtmlTokenType, HtmlTokenError; +import "package:angular/src/facade/exceptions.dart" show BaseException; void main() { group("HtmlLexer", () { diff --git a/test/compiler/html_parser_test.dart b/_tests/test/compiler/html_parser_test.dart similarity index 98% rename from test/compiler/html_parser_test.dart rename to _tests/test/compiler/html_parser_test.dart index 6a4e1cae57..872fdc2020 100644 --- a/test/compiler/html_parser_test.dart +++ b/_tests/test/compiler/html_parser_test.dart @@ -1,11 +1,11 @@ library angular2.test.compiler.html_parser_test; -import "package:angular2/src/compiler/html_ast.dart"; -import "package:angular2/src/compiler/html_lexer.dart" show HtmlTokenType; -import "package:angular2/src/compiler/html_parser.dart" - show HtmlParser, HtmlTreeError; -import "package:angular2/src/compiler/parse_util.dart" show ParseError; import 'package:test/test.dart'; +import "package:angular/src/compiler/html_ast.dart"; +import "package:angular/src/compiler/html_lexer.dart" show HtmlTokenType; +import "package:angular/src/compiler/html_parser.dart" + show HtmlParser, HtmlTreeError; +import "package:angular/src/compiler/parse_util.dart" show ParseError; import "html_ast_spec_utils.dart" show humanizeDom, humanizeDomSourceSpans, humanizeLineColumn; diff --git a/test/compiler/output/abstract_emitter_test.dart b/_tests/test/compiler/output/abstract_emitter_test.dart similarity index 93% rename from test/compiler/output/abstract_emitter_test.dart rename to _tests/test/compiler/output/abstract_emitter_test.dart index cc11afe213..d51585913f 100644 --- a/test/compiler/output/abstract_emitter_test.dart +++ b/_tests/test/compiler/output/abstract_emitter_test.dart @@ -1,8 +1,8 @@ library angular2.test.compiler.output.abstract_emitter_test; -import "package:angular2/src/compiler/output/abstract_emitter.dart" - show escapeSingleQuoteString; import "package:test/test.dart"; +import "package:angular/src/compiler/output/abstract_emitter.dart" + show escapeSingleQuoteString; void main() { group("AbstractEmitter", () { diff --git a/test/compiler/output/dart_emitter_test.dart b/_tests/test/compiler/output/dart_emitter_test.dart similarity index 98% rename from test/compiler/output/dart_emitter_test.dart rename to _tests/test/compiler/output/dart_emitter_test.dart index 8111b8981a..60789a9c78 100644 --- a/test/compiler/output/dart_emitter_test.dart +++ b/_tests/test/compiler/output/dart_emitter_test.dart @@ -1,11 +1,10 @@ library angular2.test.compiler.output.dart_emitter_test; -import 'package:angular2/src/compiler/compile_metadata.dart' - show CompileIdentifierMetadata; -import 'package:angular2/src/compiler/output/dart_emitter.dart' - show DartEmitter; -import 'package:angular2/src/compiler/output/output_ast.dart' as o; import 'package:test/test.dart'; +import 'package:angular/src/compiler/compile_metadata.dart' + show CompileIdentifierMetadata; +import 'package:angular/src/compiler/output/dart_emitter.dart' show DartEmitter; +import 'package:angular/src/compiler/output/output_ast.dart' as o; var someModuleUrl = 'asset:somePackage/lib/somePath'; var anotherModuleUrl = 'asset:somePackage/lib/someOtherPath'; diff --git a/test/compiler/output/output_emitter_codegen_typed.dart b/_tests/test/compiler/output/output_emitter_codegen_typed.dart similarity index 90% rename from test/compiler/output/output_emitter_codegen_typed.dart rename to _tests/test/compiler/output/output_emitter_codegen_typed.dart index 5a11f07f87..6e8409164f 100644 --- a/test/compiler/output/output_emitter_codegen_typed.dart +++ b/_tests/test/compiler/output/output_emitter_codegen_typed.dart @@ -1,6 +1,11 @@ -import 'package:angular2/src/core/linker/view_type.dart' show ViewType; -import 'package:angular2/src/facade/async.dart' show EventEmitter; -import 'package:angular2/src/facade/exceptions.dart' show BaseException; +// **WARNING**: Do not delete this file. +// +// It is currently used as part of the expression parsing tests, even though the +// concept of 'DynamicClass' doesn't exist anymore in AngularDart. + +import 'dart:async'; +import 'package:angular/src/core/linker/view_type.dart' show ViewType; +import 'package:angular/src/facade/exceptions.dart' show BaseException; import 'output_emitter_util.dart' show ExternalClass; @@ -77,7 +82,7 @@ dynamic getExpressions() { 'conditionalFalse': ((''.length != 0) ? 'true' : 'false'), 'not': !false, 'externalTestIdentifier': ExternalClass, - 'externalSrcIdentifier': EventEmitter, + 'externalSrcIdentifier': Stream, 'externalEnumIdentifier': ViewType.HOST, 'externalInstance': externalInstance, 'dynamicInstance': dynamicInstance, diff --git a/test/compiler/output/output_emitter_util.dart b/_tests/test/compiler/output/output_emitter_util.dart similarity index 95% rename from test/compiler/output/output_emitter_util.dart rename to _tests/test/compiler/output/output_emitter_util.dart index 38f6eac840..68ed509b9f 100644 --- a/test/compiler/output/output_emitter_util.dart +++ b/_tests/test/compiler/output/output_emitter_util.dart @@ -1,9 +1,9 @@ library angular2.test.compiler.output.output_emitter_util; -import "package:angular2/src/compiler/compile_metadata.dart" +import "package:angular/src/compiler/compile_metadata.dart" show CompileIdentifierMetadata; -import "package:angular2/src/compiler/compiler_utils.dart" show MODULE_SUFFIX; -import "package:angular2/src/compiler/output/output_ast.dart" as o; +import "package:angular/src/compiler/compiler_utils.dart" show MODULE_SUFFIX; +import "package:angular/src/compiler/output/output_ast.dart" as o; class ExternalClass { dynamic data; @@ -22,13 +22,13 @@ var testDataIdentifier = new CompileIdentifierMetadata( 'asset:angular2/test/compiler/output/output_emitter_util$MODULE_SUFFIX'); var eventEmitterIdentifier = new CompileIdentifierMetadata( name: "EventEmitter", - moduleUrl: 'asset:angular2/lib/src/facade/async$MODULE_SUFFIX'); + moduleUrl: 'asset:angular/lib/src/facade/async$MODULE_SUFFIX'); var enumIdentifier = new CompileIdentifierMetadata( name: "ViewType.HOST", - moduleUrl: 'asset:angular2/lib/src/core/linker/view_type$MODULE_SUFFIX'); + moduleUrl: 'asset:angular/lib/src/core/linker/view_type$MODULE_SUFFIX'); var baseExceptionIdentifier = new CompileIdentifierMetadata( name: "BaseException", - moduleUrl: 'asset:angular2/lib/src/facade/exceptions$MODULE_SUFFIX'); + moduleUrl: 'asset:angular/lib/src/facade/exceptions$MODULE_SUFFIX'); var codegenExportsVars = ["getExpressions"]; List _getExpressionsStmts = [ o.variable("readVar").set(o.literal("someValue")).toDeclStmt(), diff --git a/test/compiler/output/path_util_test.dart b/_tests/test/compiler/output/path_util_test.dart similarity index 95% rename from test/compiler/output/path_util_test.dart rename to _tests/test/compiler/output/path_util_test.dart index 358e46e785..42578f4d78 100644 --- a/test/compiler/output/path_util_test.dart +++ b/_tests/test/compiler/output/path_util_test.dart @@ -1,9 +1,9 @@ @TestOn('browser') library angular2.test.compiler.output.path_util_test; -import 'package:angular2/src/compiler/output/path_util.dart' - show getImportModulePath; import 'package:test/test.dart'; +import 'package:angular/src/compiler/output/path_util.dart' + show getImportModulePath; import "../../test_util.dart"; diff --git a/test/compiler/preserve_whitespace_test.dart b/_tests/test/compiler/preserve_whitespace_test.dart similarity index 98% rename from test/compiler/preserve_whitespace_test.dart rename to _tests/test/compiler/preserve_whitespace_test.dart index 81c42d9983..a3dd4b8d25 100644 --- a/test/compiler/preserve_whitespace_test.dart +++ b/_tests/test/compiler/preserve_whitespace_test.dart @@ -2,9 +2,9 @@ @TestOn('browser') library angular2.test.compiler.preserve_whitespace_test; -import 'package:angular2/angular2.dart'; import 'package:angular_test/angular_test.dart'; import 'package:test/test.dart'; +import 'package:angular/angular.dart'; void main() { var testRoot; diff --git a/test/compiler/schema/dom_element_schema_registry_test.dart b/_tests/test/compiler/schema/dom_element_schema_registry_test.dart similarity index 95% rename from test/compiler/schema/dom_element_schema_registry_test.dart rename to _tests/test/compiler/schema/dom_element_schema_registry_test.dart index a627b1d918..2e47e00dcd 100644 --- a/test/compiler/schema/dom_element_schema_registry_test.dart +++ b/_tests/test/compiler/schema/dom_element_schema_registry_test.dart @@ -1,9 +1,9 @@ library angular2.test.compiler.schema.dom_element_schema_registry_test; -import "package:angular2/src/compiler/schema/dom_element_schema_registry.dart" - show DomElementSchemaRegistry; -import "package:angular2/src/core/security.dart"; import 'package:test/test.dart'; +import "package:angular/src/compiler/schema/dom_element_schema_registry.dart" + show DomElementSchemaRegistry; +import "package:angular/src/core/security.dart"; void main() { group("DOMElementSchema", () { diff --git a/test/compiler/schema_registry_mock.dart b/_tests/test/compiler/schema_registry_mock.dart similarity index 83% rename from test/compiler/schema_registry_mock.dart rename to _tests/test/compiler/schema_registry_mock.dart index 392f7bac5c..4151dcfed7 100644 --- a/test/compiler/schema_registry_mock.dart +++ b/_tests/test/compiler/schema_registry_mock.dart @@ -1,7 +1,7 @@ library angular2.test.compiler.schema_registry_mock; -import 'package:angular2/src/compiler/schema/element_schema_registry.dart'; -import 'package:angular2/src/core/security.dart'; +import 'package:angular/src/compiler/schema/element_schema_registry.dart'; +import 'package:angular/src/core/security.dart'; class MockSchemaRegistry implements ElementSchemaRegistry { final Map existingProperties; diff --git a/test/compiler/selector_test.dart b/_tests/test/compiler/selector_test.dart similarity index 99% rename from test/compiler/selector_test.dart rename to _tests/test/compiler/selector_test.dart index 5d3b5ffd25..5defd8d98f 100644 --- a/test/compiler/selector_test.dart +++ b/_tests/test/compiler/selector_test.dart @@ -3,10 +3,10 @@ library angular2.test.compiler.selector_test; import 'dart:html'; -import 'package:angular2/src/compiler/attribute_matcher.dart'; -import 'package:angular2/src/compiler/selector.dart' - show CssSelector, SelectorMatcher; import 'package:test/test.dart'; +import 'package:angular/src/compiler/attribute_matcher.dart'; +import 'package:angular/src/compiler/selector.dart' + show CssSelector, SelectorMatcher; import "../test_util.dart"; diff --git a/test/compiler/shadow_css_test.dart b/_tests/test/compiler/shadow_css_test.dart similarity index 94% rename from test/compiler/shadow_css_test.dart rename to _tests/test/compiler/shadow_css_test.dart index 3706fc3d87..52585a526d 100644 --- a/test/compiler/shadow_css_test.dart +++ b/_tests/test/compiler/shadow_css_test.dart @@ -1,9 +1,9 @@ @TestOn('browser') library angular2.test.compiler.shadow_css_test; -import 'package:angular2/src/compiler/shadow_css.dart'; -import "package:angular2/src/testing/internal.dart"; import 'package:test/test.dart'; +import 'package:angular/src/compiler/shadow_css.dart'; +import "package:angular/src/testing/internal.dart"; const content = 'content'; const host = 'host'; @@ -114,11 +114,6 @@ void main() { shimAndExpect(':host.x::before {}', '.$host.x::before {}'); }); - test("shouldn't scope siblings", () { - shimAndExpect(':host + .x {}', '.$host + .x {}'); - shimAndExpect(':host ~ .x {}', '.$host ~ .x {}'); - }); - test('should differentiate legacy encapsulation', () { shimAndExpect(':host p {}', '.$host p.$content {}', expectedLegacy: '.$host p {}'); @@ -172,11 +167,6 @@ void main() { test('should handle multiple selectors', () { shimAndExpect(':host(.x),:host(a) {}', '.$host.x,a.$host {}'); }); - - test("shouldn't shim siblings", () { - shimAndExpect(':host(.x) + .y {}', '.$host.x + .y {}'); - shimAndExpect(':host(.x) ~ .y {}', '.$host.x ~ .y {}'); - }); }); group(':host-context()', () { @@ -228,13 +218,6 @@ void main() { var expected = '.$host.x,.x .$host,.$host.y,.y .$host {}'; shimAndExpect(css, expected); }); - - test("shouldn't shim siblings", () { - var css = ':host-context(.x) + .y {}'; - shimAndExpect(css, '.$host.x + .y,.x .$host + .y {}'); - css = ':host-context(.x) ~ .y {}'; - shimAndExpect(css, '.$host.x ~ .y,.x .$host ~ .y {}'); - }); }); // Each host selector contributes a host class. For now this duplication is @@ -323,6 +306,19 @@ void main() { shimAndExpect(css, 'x.$content y {}'); }); + test('should handle ::ng-deep', () { + var css = '::ng-deep y {}'; + shimAndExpect(css, 'y {}'); + css = 'x ::ng-deep y {}'; + shimAndExpect(css, 'x.$content y {}'); + css = ':host > ::ng-deep .x {}'; + shimAndExpect(css, '.$host > .x {}'); + css = ':host ::ng-deep > .x {}'; + shimAndExpect(css, '.$host > .x {}'); + css = ':host > ::ng-deep > .x {}'; + shimAndExpect(css, '.$host > > .x {}'); + }); + test('should pass through @import directives', () { var css = '@import url("https://fonts.googleapis.com/css?family=Roboto");'; shimAndExpect(css, css); diff --git a/test/compiler/style_url_resolver_test.dart b/_tests/test/compiler/style_url_resolver_test.dart similarity index 96% rename from test/compiler/style_url_resolver_test.dart rename to _tests/test/compiler/style_url_resolver_test.dart index 1c43a7530d..08643f40d3 100644 --- a/test/compiler/style_url_resolver_test.dart +++ b/_tests/test/compiler/style_url_resolver_test.dart @@ -1,9 +1,9 @@ library angular2.test.compiler.style_url_resolver_test; -import "package:angular2/src/compiler/style_url_resolver.dart" - show extractStyleUrls, isStyleUrlResolvable; -import "package:angular2/src/core/url_resolver.dart" show UrlResolver; import 'package:test/test.dart'; +import "package:angular/src/compiler/style_url_resolver.dart" + show extractStyleUrls, isStyleUrlResolvable; +import "package:angular/src/core/url_resolver.dart" show UrlResolver; void main() { group("extractStyleUrls", () { diff --git a/test/compiler/template_humanizer_util.dart b/_tests/test/compiler/template_humanizer_util.dart similarity index 99% rename from test/compiler/template_humanizer_util.dart rename to _tests/test/compiler/template_humanizer_util.dart index dc1818b1bb..ef262f269a 100644 --- a/test/compiler/template_humanizer_util.dart +++ b/_tests/test/compiler/template_humanizer_util.dart @@ -1,4 +1,5 @@ -import "package:angular2/src/compiler/template_ast.dart"; +import "package:angular/src/compiler/template_ast.dart"; + import "expression_parser/unparser.dart" show Unparser; var expressionUnparser = new Unparser(); diff --git a/test/compiler/template_parser_test.dart b/_tests/test/compiler/template_parser_test.dart similarity index 99% rename from test/compiler/template_parser_test.dart rename to _tests/test/compiler/template_parser_test.dart index e9521510df..f82b59d957 100644 --- a/test/compiler/template_parser_test.dart +++ b/_tests/test/compiler/template_parser_test.dart @@ -1,20 +1,20 @@ @TestOn('browser') library angular2.test.compiler.template_parser_test; -import "package:angular2/src/compiler/compile_metadata.dart"; -import "package:angular2/src/compiler/expression_parser/lexer.dart"; -import "package:angular2/src/compiler/expression_parser/parser.dart"; -import "package:angular2/src/compiler/html_parser.dart"; -import "package:angular2/src/compiler/identifiers.dart" +import "package:logging/logging.dart"; +import 'package:test/test.dart'; +import "package:angular/src/compiler/compile_metadata.dart"; +import "package:angular/src/compiler/expression_parser/lexer.dart"; +import "package:angular/src/compiler/expression_parser/parser.dart"; +import "package:angular/src/compiler/html_parser.dart"; +import "package:angular/src/compiler/identifiers.dart" show identifierToken, Identifiers; -import "package:angular2/src/compiler/schema/element_schema_registry.dart" +import 'package:angular/src/compiler/schema/dom_element_schema_registry.dart'; +import "package:angular/src/compiler/schema/element_schema_registry.dart" show ElementSchemaRegistry; -import 'package:angular2/src/compiler/schema/dom_element_schema_registry.dart'; -import "package:angular2/src/compiler/template_ast.dart"; -import "package:angular2/src/compiler/template_parser.dart" +import "package:angular/src/compiler/template_ast.dart"; +import "package:angular/src/compiler/template_parser.dart" show TemplateParser, splitClasses; -import "package:logging/logging.dart"; -import 'package:test/test.dart'; import "../test_util.dart"; import "schema_registry_mock.dart" show MockSchemaRegistry; diff --git a/test/compiler/template_preparser_test.dart b/_tests/test/compiler/template_preparser_test.dart similarity index 67% rename from test/compiler/template_preparser_test.dart rename to _tests/test/compiler/template_preparser_test.dart index a49cd7f6f5..a90aa52cf6 100644 --- a/test/compiler/template_preparser_test.dart +++ b/_tests/test/compiler/template_preparser_test.dart @@ -1,7 +1,7 @@ -import 'package:angular2/src/compiler/html_parser.dart' show HtmlParser; -import 'package:angular2/src/compiler/template_preparser.dart' - show preparseElement, PreparsedElementType, PreparsedElement; import 'package:test/test.dart'; +import 'package:angular/src/compiler/html_parser.dart' show HtmlParser; +import 'package:angular/src/compiler/template_preparser.dart' + show preparseElement, PreparsedElementType, PreparsedElement; void main() { group("preparseElement", () { @@ -15,22 +15,21 @@ void main() { } test("should detect script elements", () async { - expect(preparse("