test(core): update Web Platform feature detection (#24861)

PR Close #24861
This commit is contained in:
Rob Wormald
2018-07-12 15:58:13 -07:00
committed by Misko Hevery
parent 6e6489a408
commit d76a7d6f7c
5 changed files with 25 additions and 10 deletions

View File

@ -9,6 +9,7 @@
import {Component, DoBootstrap, EventEmitter, Injector, Input, NgModule, Output, destroyPlatform} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {browserDetection} from '@angular/platform-browser/testing/src/browser_util';
import {Subject} from 'rxjs';
import {NgElementConstructor, createCustomElement} from '../src/create-custom-element';
@ -19,7 +20,7 @@ type WithFooBar = {
barBar: string
};
if (typeof customElements !== 'undefined') {
if (browserDetection.supportsCustomElements) {
describe('createCustomElement', () => {
let NgElementCtor: NgElementConstructor<WithFooBar>;
let strategy: TestStrategy;