| OLD | NEW |
| 1 library ng_specs; | 1 library ng_specs; |
| 2 | 2 |
| 3 | 3 |
| 4 import 'dart:html'; | 4 import 'dart:html'; |
| 5 import 'dart:mirrors' as mirror; | 5 import 'dart:mirrors' as mirror; |
| 6 import 'package:unittest/unittest.dart' as unit; | 6 import 'package:unittest/unittest.dart' as unit; |
| 7 import 'package:angular/angular.dart'; | 7 import 'package:angular/angular.dart'; |
| 8 import 'package:angular/mock/module.dart'; | 8 import 'package:angular/mock/module.dart'; |
| 9 | 9 |
| 10 import 'jasmine_syntax.dart'; | 10 import 'jasmine_syntax.dart'; |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 Map matchState, bool verbose) { | 145 Map matchState, bool verbose) { |
| 146 return super.describeMismatch('$item', mismatchDescription, matchState, | 146 return super.describeMismatch('$item', mismatchDescription, matchState, |
| 147 verbose); | 147 verbose); |
| 148 } | 148 } |
| 149 } | 149 } |
| 150 | 150 |
| 151 $(selector) { | 151 $(selector) { |
| 152 return new JQuery(selector); | 152 return new JQuery(selector); |
| 153 } | 153 } |
| 154 | 154 |
| 155 |
| 156 class GetterSetter { |
| 157 Getter getter(String key) => null; |
| 158 Setter setter(String key) => null; |
| 159 } |
| 155 var getterSetter = new GetterSetter(); | 160 var getterSetter = new GetterSetter(); |
| 156 | 161 |
| 157 class JQuery implements List<Node> { | 162 class JQuery implements List<Node> { |
| 158 List<Node> _list = []; | 163 List<Node> _list = []; |
| 159 | 164 |
| 160 JQuery([selector]) { | 165 JQuery([selector]) { |
| 161 if (selector == null) { | 166 if (selector == null) { |
| 162 // do nothing; | 167 // do nothing; |
| 163 } else if (selector is String) { | 168 } else if (selector is String) { |
| 164 _list.addAll(es(selector)); | 169 _list.addAll(es(selector)); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 (Element n, v) => n.style.setProperty(name, value), value); | 234 (Element n, v) => n.style.setProperty(name, value), value); |
| 230 children() => new JQuery(this[0].childNodes); | 235 children() => new JQuery(this[0].childNodes); |
| 231 } | 236 } |
| 232 | 237 |
| 233 | 238 |
| 234 main() { | 239 main() { |
| 235 beforeEach(setUpInjector); | 240 beforeEach(setUpInjector); |
| 236 beforeEach(() => wrapFn(sync)); | 241 beforeEach(() => wrapFn(sync)); |
| 237 afterEach(tearDownInjector); | 242 afterEach(tearDownInjector); |
| 238 } | 243 } |
| OLD | NEW |