refactor(view_spec): Drop SomeComponentWithEmulatedShadowDom

This commit is contained in:
Victor Berchet 2015-02-10 18:18:19 +01:00
parent bbd212c256
commit b953956a35
1 changed files with 4 additions and 10 deletions

View File

@ -380,7 +380,7 @@ export function main() {
(view) => expectViewHasNoDirectiveInstances(view)); (view) => expectViewHasNoDirectiveInstances(view));
}); });
it('should create shadow dom', () => { it('should create shadow dom (Native Strategy)', () => {
var subpv = new ProtoView(el('<span>hello shadow dom</span>'), var subpv = new ProtoView(el('<span>hello shadow dom</span>'),
new DynamicProtoChangeDetector(), new DynamicProtoChangeDetector(),
null); null);
@ -391,14 +391,14 @@ export function main() {
expect(view.nodes[0].shadowRoot.childNodes[0].childNodes[0].nodeValue).toEqual('hello shadow dom'); expect(view.nodes[0].shadowRoot.childNodes[0].childNodes[0].nodeValue).toEqual('hello shadow dom');
}); });
it('should use the provided shadow DOM strategy', () => { it('should emulate shadow dom (Emulated Strategy)', () => {
var subpv = new ProtoView(el('<span>hello shadow dom</span>'), var subpv = new ProtoView(el('<span>hello shadow dom</span>'),
new DynamicProtoChangeDetector(), null); new DynamicProtoChangeDetector(), null);
var pv = new ProtoView(el('<cmp class="ng-binding"></cmp>'), var pv = new ProtoView(el('<cmp class="ng-binding"></cmp>'),
new DynamicProtoChangeDetector(), new EmulatedShadowDomStrategy()); new DynamicProtoChangeDetector(), new EmulatedShadowDomStrategy());
var binder = pv.bindElement(new ProtoElementInjector(null, 0, [SomeComponentWithEmulatedShadowDom], true)); var binder = pv.bindElement(new ProtoElementInjector(null, 0, [SomeComponent], true));
binder.componentDirective = new DirectiveMetadataReader().read(SomeComponentWithEmulatedShadowDom); binder.componentDirective = new DirectiveMetadataReader().read(SomeComponent);
binder.nestedProtoView = subpv; binder.nestedProtoView = subpv;
var view = createNestedView(pv); var view = createNestedView(pv);
@ -658,12 +658,6 @@ class SomeComponent {
} }
} }
@Component({
componentServices: []
})
class SomeComponentWithEmulatedShadowDom {
}
@Decorator({ @Decorator({
selector: '[dec]' selector: '[dec]'
}) })