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

Side by Side Diff: third_party/pkg/angular/lib/mock/log.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 part of angular.mock; 1 part of angular.mock;
2 2
3 /** 3 /**
4 * A convenient way to assert the order in which the DOM elements are processed. 4 * A convenient way to assert the order in which the DOM elements are processed.
5 * 5 *
6 * In your test create: 6 * In your test create:
7 * 7 *
8 * <div log="foo">...</div> 8 * <div log="foo">...</div>
9 * 9 *
10 * And then assert: 10 * And then assert:
11 * 11 *
12 * expect(logger).toEqual(['foo']); 12 * expect(logger).toEqual(['foo']);
13 */ 13 */
14 @NgDirective( 14 @Decorator(
15 selector: '[log]', 15 selector: '[log]',
16 map: const { 16 map: const {
17 'log': '@logMessage' 17 'log': '@logMessage'
18 }) 18 })
19 class LogAttrDirective implements NgAttachAware { 19 class LogAttrDirective implements AttachAware {
20 final Logger log; 20 final Logger log;
21 String logMessage; 21 String logMessage;
22 LogAttrDirective(this.log); 22 LogAttrDirective(this.log);
23 void attach() { 23 void attach() {
24 log(logMessage == '' ? 'LOG' : logMessage); 24 log(logMessage == '' ? 'LOG' : logMessage);
25 } 25 }
26 } 26 }
27 27
28 /** 28 /**
29 * A convenient way to verify that a set of operations executed in a specific 29 * A convenient way to verify that a set of operations executed in a specific
(...skipping 27 matching lines...) Expand all
57 operator [](int index) => tokens[index]; 57 operator [](int index) => tokens[index];
58 58
59 void operator []=(int index, value) { 59 void operator []=(int index, value) {
60 tokens[index] = value; 60 tokens[index] = value;
61 } 61 }
62 62
63 void set length(int newLength) { 63 void set length(int newLength) {
64 tokens.length = newLength; 64 tokens.length = newLength;
65 } 65 }
66 } 66 }
OLDNEW
« no previous file with comments | « third_party/pkg/angular/lib/mock/http_backend.dart ('k') | third_party/pkg/angular/lib/mock/mock_window.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698