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

Unified Diff: third_party/pkg/angular/test/directive/ng_non_bindable_spec.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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/directive/ng_non_bindable_spec.dart
diff --git a/third_party/pkg/angular/test/directive/ng_non_bindable_spec.dart b/third_party/pkg/angular/test/directive/ng_non_bindable_spec.dart
index 867716c9d78c4b3d92bb566cec0e32d5e6d3e5a4..a2ec3fb3dfa6e23bdec3e919783b274bcd59849a 100644
--- a/third_party/pkg/angular/test/directive/ng_non_bindable_spec.dart
+++ b/third_party/pkg/angular/test/directive/ng_non_bindable_spec.dart
@@ -6,11 +6,11 @@ main() {
describe('NonBindableDirective', () {
TestBed _;
- beforeEach(inject((TestBed tb) => _ = tb));
+ beforeEach((TestBed tb) => _ = tb);
it('should set ignore all other markup/directives on the descendent nodes',
- inject((Scope scope, Injector injector, Compiler compiler, DirectiveMap directives) {
- var element = $('<div>' +
+ (Scope scope, Injector injector, Compiler compiler, DirectiveMap directives) {
+ Element element = e('<div>' +
' <span id="s1">{{a}}</span>' +
' <span id="s2" ng-bind="b"></span>' +
' <div foo="{{a}}" ng-non-bindable>' +
@@ -19,21 +19,21 @@ main() {
' <span id="s3">{{a}}</span>' +
' <span id="s4" ng-bind="b"></span>' +
'</div>');
- compiler(element, directives)(injector, element);
+ compiler([element], directives)(injector, [element]);
scope.context['a'] = "one";
scope.context['b'] = "two";
scope.apply();
// Bindings not contained by ng-non-bindable should resolve.
- expect(element.find("#s1").text().trim()).toEqual('one');
- expect(element.find("#s2").text().trim()).toEqual('two');
- expect(element.find("#s3").text().trim()).toEqual('one');
- expect(element.find("#s4").text().trim()).toEqual('two');
+ expect(element.querySelector("#s1").text.trim()).toEqual('one');
+ expect(element.querySelector("#s2").text.trim()).toEqual('two');
+ expect(element.querySelector("#s3").text.trim()).toEqual('one');
+ expect(element.querySelector("#s4").text.trim()).toEqual('two');
// Bindings contained by ng-non-bindable should be left alone.
- var nonBindableDiv = element.find("div");
- expect(nonBindableDiv.html().trim()).toEqual('<span ng-bind="a"></span>{{b}}');
- expect(nonBindableDiv.text().trim()).toEqual('{{b}}');
+ var nonBindableDiv = element.querySelector("div");
+ expect(nonBindableDiv).toHaveHtml('<span ng-bind="a"></span>{{b}}');
+ expect(nonBindableDiv.text.trim()).toEqual('{{b}}');
// Bindings on the same node are processed.
- expect(nonBindableDiv.attr('foo')).toEqual('one');
- }));
+ expect(nonBindableDiv.attributes['foo']).toEqual('one');
+ });
});
}

Powered by Google App Engine
This is Rietveld 408576698