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

Side by Side Diff: third_party/pkg/angular/test/directive/ng_switch_spec.dart

Issue 148453003: Updating Angular version (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library ng_switch_spec; 1 library ng_switch_spec;
2 2
3 import '../_specs.dart'; 3 import '../_specs.dart';
4 4
5 main() => describe('ngSwitch', () { 5 main() => describe('ngSwitch', () {
6 TestBed _; 6 TestBed _;
7 7
8 beforeEach(inject((TestBed tb) => _ = tb)); 8 beforeEach(inject((TestBed tb) => _ = tb));
9 9
10 it('should switch on value change', inject(() { 10 it('should switch on value change', inject(() {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 _.rootScope.name = 'works'; 183 _.rootScope.name = 'works';
184 _.rootScope.$apply(); 184 _.rootScope.$apply();
185 var child1 = getChildScope(); 185 var child1 = getChildScope();
186 expect(child1).toBeNotNull(); 186 expect(child1).toBeNotNull();
187 expect(element.text).toEqual('works'); 187 expect(element.text).toEqual('works');
188 var destroyListener = jasmine.createSpy('watch listener'); 188 var destroyListener = jasmine.createSpy('watch listener');
189 var listenerRemove = child1.$on('\$destroy', destroyListener); 189 var listenerRemove = child1.$on('\$destroy', destroyListener);
190 190
191 _.rootScope.url = 'x'; 191 _.rootScope.url = 'x';
192 _.rootScope.$apply(); 192 _.rootScope.$apply();
193 print(element);
194 print(getChildScope());
195 expect(getChildScope()).toBeNull(); 193 expect(getChildScope()).toBeNull();
196 expect(destroyListener).toHaveBeenCalledOnce(); 194 expect(destroyListener).toHaveBeenCalledOnce();
197 listenerRemove(); 195 listenerRemove();
198 196
199 _.rootScope.url = 'a'; 197 _.rootScope.url = 'a';
200 _.rootScope.$apply(); 198 _.rootScope.$apply();
201 var child2 = getChildScope(); 199 var child2 = getChildScope();
202 expect(child2).toBeDefined(); 200 expect(child2).toBeDefined();
203 expect(child2).not.toBe(child1); 201 expect(child2).not.toBe(child1);
204 })); 202 }));
205 }); 203 });
OLDNEW
« no previous file with comments | « third_party/pkg/angular/test/directive/ng_src_boolean_spec.dart ('k') | third_party/pkg/angular/test/introspection_spec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698