Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Unified Diff: third_party/pkg/angular/test/core_dom/selector_spec.dart

Issue 148453003: Updating Angular version (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/angular/test/core_dom/selector_spec.dart
diff --git a/third_party/pkg/angular/test/core_dom/selector_spec.dart b/third_party/pkg/angular/test/core_dom/selector_spec.dart
index c2c4e92e2e35ed7ddf2ad05c727c60d3b3ff49b7..45554a0dc1232580be13626cb70464285fb74814 100644
--- a/third_party/pkg/angular/test/core_dom/selector_spec.dart
+++ b/third_party/pkg/angular/test/core_dom/selector_spec.dart
@@ -5,6 +5,7 @@ import '../_specs.dart';
@NgDirective(selector:'b') class _BElement{}
@NgDirective(selector:'.b') class _BClass{}
@NgDirective(selector:'[directive]') class _DirectiveAttr{}
+@NgDirective(selector:'[wildcard-*]') class _WildcardDirectiveAttr{}
@NgDirective(selector:'[directive=d][foo=f]') class _DirectiveFooAttr{}
@NgDirective(selector:'b[directive]') class _BElementDirectiveAttr{}
@NgDirective(selector:'[directive=value]') class _DirectiveValueAttr{}
@@ -43,6 +44,7 @@ main() {
..type(_BElement)
..type(_BClass)
..type(_DirectiveAttr)
+ ..type(_WildcardDirectiveAttr)
..type(_DirectiveFooAttr)
..type(_BElementDirectiveAttr)
..type(_DirectiveValueAttr)
@@ -126,6 +128,14 @@ main() {
]));
});
+ it('should match attribute names', () {
+ expect(selector(element = e('<div wildcard-match=ignored></div>')),
+ toEqualsDirectiveInfos([
+ { "selector": '[wildcard-*]', "value": 'ignored',
+ "element": element, "name": 'wildcard-match'}
+ ]));
+ });
+
it('should match text', () {
expect(selector(element = e('before-abc-after')),
toEqualsDirectiveInfos([
@@ -159,6 +169,7 @@ main() {
toEqualsDirectiveInfos([
{ "selector": '[ng-model]', "value": 'val', "element": element},
{ "selector": '[probe]', "value": 'i', "element": element},
+ { "selector": '[ng-model][required]', "value": 'true', "element": element},
{ "selector": 'input[type=text][ng-model]', "value": 'val', "element": element}
]));
});

Powered by Google App Engine
This is Rietveld 408576698