text: import * as tslib_1 from "tslib";
  /**
   * @license Angular v4.4.3
   * (c) 2010-2017 Google, Inc. https://angular.io/
   * License: MIT
   */
  import { platformCoreDynamicTesting } from '@angular/compiler/testing';
  import { Inject, Injectable, NgModule, createPlatformFactory } from '@angular/core';
  import { TestComponentRenderer } from '@angular/core/testing';
  import { ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS } from '@angular/platform-browser-dynamic';
  import { BrowserTestingModule } from '@angular/platform-browser/testing';
  import { DOCUMENT, ɵgetDOM } from '@angular/platform-browser';
  /**
   * @license
   * Copyright Google Inc. All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */
  /**
   * A DOM based implementation of the TestComponentRenderer.
   */
  var DOMTestComponentRenderer = (function (_super) {
      tslib_1.__extends(DOMTestComponentRenderer, _super);
      function DOMTestComponentRenderer(_doc /** TODO #9100 */) {
          var _this = _super.call(this) || this;
          _this._doc = _doc; /** TODO #9100 */
          return _this;
      }
      DOMTestComponentRenderer.prototype.insertRootElement = function (rootElId) {
          var rootEl = ɵgetDOM().firstChild(ɵgetDOM().content(ɵgetDOM().createTemplate("<div id=\"" + rootElId + "\"></div>")));
          // TODO(juliemr): can/should this be optional?
          var oldRoots = ɵgetDOM().querySelectorAll(this._doc, '[id^=root]');
          for (var i = 0; i < oldRoots.length; i++) {
              ɵgetDOM().remove(oldRoots[i]);
          }
          ɵgetDOM().appendChild(this._doc.body, rootEl);
      };
      return DOMTestComponentRenderer;
  }(TestComponentRenderer));
  DOMTestComponentRenderer.decorators = [
      { type: Injectable },
  ];
  /** @nocollapse */
  DOMTestComponentRenderer.ctorParameters = function () { return [
      { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] },] },
  ]; };
  /**
   * @license
   * Copyright Google Inc. All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */
  /**
   * @license
   * Copyright Google Inc. All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */
  /**
   * @stable
   */
  var platformBrowserDynamicTesting = createPlatformFactory(platformCoreDynamicTesting, 'browserDynamicTesting', ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);
  /**
   * NgModule for testing.
   *
   * @stable
   */
  var BrowserDynamicTestingModule = (function () {
      function BrowserDynamicTestingModule() {
      }
      return BrowserDynamicTestingModule;
  }());
  BrowserDynamicTestingModule.decorators = [
      { type: NgModule, args: [{
                  exports: [BrowserTestingModule],
                  providers: [
                      { provide: TestComponentRenderer, useClass: DOMTestComponentRenderer },
                  ]
              },] },
  ];
  /** @nocollapse */
  BrowserDynamicTestingModule.ctorParameters = function () { return []; };
  /**
   * @license
   * Copyright Google Inc. All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */
  /**
   * @module
   * @description
   * Entry point for all public APIs of the platform-browser-dynamic/testing package.
   */
  export { platformBrowserDynamicTesting, BrowserDynamicTestingModule, DOMTestComponentRenderer as ɵDOMTestComponentRenderer };
  //# sourceMappingURL=testing.es5.js.map
  