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

Unified Diff: third_party/pkg/angular/lib/mock/test_bed.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pkg/angular/lib/mock/probe.dart ('k') | third_party/pkg/angular/lib/mock/test_injection.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pkg/angular/lib/mock/test_bed.dart
===================================================================
--- third_party/pkg/angular/lib/mock/test_bed.dart (revision 33054)
+++ third_party/pkg/angular/lib/mock/test_bed.dart (working copy)
@@ -34,9 +34,9 @@
*
* An option [scope] parameter can be supplied to link it with non root scope.
*/
- Element compile(html, {Scope scope, DirectiveMap directives}) {
+ Element compile(html, {Scope scope}) {
var injector = this.injector;
- if (scope != null) {
+ if(scope != null) {
injector = injector.createChild([new Module()..value(Scope, scope)]);
}
if (html is String) {
@@ -49,10 +49,7 @@
throw 'Expecting: String, Node, or List<Node> got $html.';
}
rootElement = rootElements[0];
- if (directives == null) {
- directives = injector.get(DirectiveMap);
- }
- rootBlock = compiler(rootElements, directives)(injector, rootElements);
+ rootBlock = compiler(rootElements)(injector, rootElements);
return rootElement;
}
@@ -63,7 +60,7 @@
var div = new DivElement();
div.setInnerHtml(html, treeSanitizer: new NullTreeSanitizer());
var nodes = [];
- for (var node in div.nodes) {
+ for(var node in div.nodes) {
nodes.add(node);
}
return nodes;
@@ -75,8 +72,6 @@
*/
triggerEvent(element, name, [type='MouseEvent']) {
element.dispatchEvent(new Event.eventType(type, name));
- // Since we are manually triggering event we need to simpulate apply();
- rootScope.apply();
}
/**
@@ -86,6 +81,5 @@
selectOption(element, text) {
element.querySelectorAll('option').forEach((o) => o.selected = o.text == text);
triggerEvent(element, 'change');
- rootScope.apply();
}
}
« no previous file with comments | « third_party/pkg/angular/lib/mock/probe.dart ('k') | third_party/pkg/angular/lib/mock/test_injection.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698