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

Side by Side Diff: third_party/pkg/angular/perf/dom/compile_perf.dart

Issue 256553002: Revert "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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/pkg/angular/perf.sh ('k') | third_party/pkg/angular/perf/invoke_perf.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import '_perf.dart'; 1 import '_perf.dart';
2 2
3 void main() { 3 main() => describe('compiler', () {
4 describe('compiler', () { 4 describe('block instantiation', () {
5 describe('view instantiation', () { 5 it('time ', inject((TestBed tb) {
6 it('time ', inject((TestBed tb) { 6 tb.compile(UL_REPEATER);
7 tb.compile(UL_REPEATER); 7 var items = [];
8 var items = []; 8 for(var i = 0; i < 100; i++) {
9 for(var i = 0; i < 100; i++) { 9 items.add({"text":'text_$i', "done": i & 1 == 1});
10 items.add({"text":'text_$i', "done": i & 1 == 1}); 10 }
11 } 11 var empty = [];
12 var empty = []; 12 tb.rootScope.context['classFor'] = (item) => 'ng-${item["done"]}';
13 tb.rootScope.context['classFor'] = (item) => 'ng-${item["done"]}';
14 13
15 time('create 100 views', 14 time('create 100 blocks',
16 () => tb.rootScope.apply(() => tb.rootScope.context['items'] = items ), 15 () => tb.rootScope.apply(() => tb.rootScope.context['items'] = items),
17 cleanUp: () => tb.rootScope.apply(() => tb.rootScope.context['items' ] = empty), 16 cleanUp: () => tb.rootScope.apply(() => tb.rootScope.context['items'] = empty),
18 verify: () => expect(tb.rootElement.querySelectorAll('li').length).t oEqual(100)); 17 verify: () => expect(tb.rootElement.querySelectorAll('li').length).toE qual(100));
19 })); 18 }));
20 });
21 }); 19 });
22 } 20 });
23 21
24 var UL_REPEATER = 22 var UL_REPEATER =
25 """ 23 """
26 <ul class="well unstyled"> 24 <ul class="well unstyled">
27 <li ng-repeat="item in items" ng-class="classFor(item)"> 25 <li ng-repeat="item in items" ng-class="classFor(item)">
28 <label class="checkbox"> 26 <label class="checkbox">
29 <input type="checkbox" ng-model="item.done"> {{item.text}} 27 <input type="checkbox" ng-model="item.done"> {{item.text}}
30 </label> 28 </label>
31 </li> 29 </li>
32 </ul> 30 </ul>
33 """; 31 """;
OLDNEW
« no previous file with comments | « third_party/pkg/angular/perf.sh ('k') | third_party/pkg/angular/perf/invoke_perf.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698