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

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

Issue 1058283006: Update pubspecs and dependencies to get pkgbuild tests working. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 library ng_include_spec;
2
3 import '../_specs.dart';
4
5 main() {
6 describe('NgInclude', () {
7 TestBed _;
8
9 beforeEach(inject((TestBed tb) => _ = tb));
10
11 it('should fetch template from literal url', async(inject((Scope scope, Temp lateCache cache) {
12 cache.put('tpl.html', new HttpResponse(200, 'my name is {{name}}'));
13
14 var element = _.compile('<div ng-include="tpl.html"></div>');
15
16 expect(element.innerHtml).toEqual('');
17
18 microLeap(); // load the template from cache.
19 scope.applyInZone(() {
20 scope.context['name'] = 'Vojta';
21 });
22 expect(element.text).toEqual('my name is Vojta');
23 })));
24
25 it('should fetch template from url using interpolation', async(inject((Scope scope, TemplateCache cache) {
26 cache.put('tpl1.html', new HttpResponse(200, 'My name is {{name}}'));
27 cache.put('tpl2.html', new HttpResponse(200, 'I am {{name}}'));
28
29 var element = _.compile('<div ng-include="{{template}}"></div>');
30
31 expect(element.innerHtml).toEqual('');
32
33 scope.applyInZone(() {
34 scope.context['name'] = 'Vojta';
35 scope.context['template'] = 'tpl1.html';
36 });
37 expect(element.text).toEqual('My name is Vojta');
38
39 scope.applyInZone(() {
40 scope.context['template'] = 'tpl2.html';
41 });
42 expect(element.text).toEqual('I am Vojta');
43 })));
44
45 });
46 }
OLDNEW
« no previous file with comments | « third_party/pkg/angular/test/directive/ng_if_spec.dart ('k') | third_party/pkg/angular/test/directive/ng_model_spec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698