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

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

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://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_events_spec; 1 library ng_events_spec;
2 2
3 import '../_specs.dart'; 3 import '../_specs.dart';
4 import 'dart:html' as dom; 4 import 'dart:html' as dom;
5 5
6 void addTest(String name, [String eventType='MouseEvent', String eventName]) { 6 void addTest(String name, [String eventType='MouseEvent', String eventName]) {
7 if (eventName == null) { 7 if (eventName == null) {
8 eventName = name; 8 eventName = name;
9 } 9 }
10 10
11 describe('ng-$name', () { 11 describe('ng-$name', () {
12 TestBed _; 12 TestBed _;
13 13
14 beforeEach(inject((TestBed tb) => _ = tb)); 14 beforeEach(inject((TestBed tb) => _ = tb));
15 15
16 it('should evaluate the expression on $name', inject(() { 16 it('should evaluate the expression on $name', inject(() {
17 _.compile('<button ng-$name="abc = true; event = \$event"></button>'); 17 _.compile('<button ng-$name="abc = true; event = \$event"></button>');
18 _.triggerEvent(_.rootElement, eventName, eventType); 18 _.triggerEvent(_.rootElement, eventName, eventType);
19 expect(_.rootScope.context['abc']).toEqual(true); 19 expect(_.rootScope['abc']).toEqual(true);
20 expect(_.rootScope.context['event'] is dom.UIEvent).toEqual(true); 20 expect(_.rootScope['event'] is dom.UIEvent).toEqual(true);
21 })); 21 }));
22 }); 22 });
23 } 23 }
24 24
25 main() { 25 main() {
26 addTest('abort'); 26 addTest('abort');
27 addTest('beforecopy'); 27 addTest('beforecopy');
28 addTest('beforecopy'); 28 addTest('beforecopy');
29 addTest('beforecut'); 29 addTest('beforecut');
30 addTest('beforepaste'); 30 addTest('beforepaste');
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // These should be of type TouchEvent but that causes the tests to fail. 72 // These should be of type TouchEvent but that causes the tests to fail.
73 // They pass as a MouseEvent. 73 // They pass as a MouseEvent.
74 //addTest('touchcancel'/*, 'TouchEvent'*/); 74 //addTest('touchcancel'/*, 'TouchEvent'*/);
75 addTest('touchenter'/*, 'TouchEvent'*/); 75 addTest('touchenter'/*, 'TouchEvent'*/);
76 addTest('touchleave'/*, 'TouchEvent'*/); 76 addTest('touchleave'/*, 'TouchEvent'*/);
77 addTest('touchend'/*, 'TouchEvent'*/); 77 addTest('touchend'/*, 'TouchEvent'*/);
78 addTest('touchmove'/*, 'TouchEvent'*/); 78 addTest('touchmove'/*, 'TouchEvent'*/);
79 addTest('touchstart'/*, 'TouchEvent'*/); 79 addTest('touchstart'/*, 'TouchEvent'*/);
80 addTest('transitionend'); 80 addTest('transitionend');
81 } 81 }
OLDNEW
« no previous file with comments | « third_party/pkg/angular/test/directive/ng_class_spec.dart ('k') | third_party/pkg/angular/test/directive/ng_form_spec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698