Project

General

Profile

1
/**
2
 * @license Angular v4.4.6
3
 * (c) 2010-2017 Google, Inc. https://angular.io/
4
 * License: MIT
5
 */
6
(function (global, factory) {
7
	typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/compiler/testing'), require('@angular/core'), require('@angular/core/testing'), require('@angular/platform-browser-dynamic'), require('@angular/platform-browser/testing'), require('@angular/platform-browser')) :
8
	typeof define === 'function' && define.amd ? define(['exports', '@angular/compiler/testing', '@angular/core', '@angular/core/testing', '@angular/platform-browser-dynamic', '@angular/platform-browser/testing', '@angular/platform-browser'], factory) :
9
	(factory((global.ng = global.ng || {}, global.ng.platformBrowserDynamic = global.ng.platformBrowserDynamic || {}, global.ng.platformBrowserDynamic.testing = global.ng.platformBrowserDynamic.testing || {}),global.ng.compiler.testing,global.ng.core,global.ng.core.testing,global.ng.platformBrowserDynamic,global.ng.platformBrowser.testing,global.ng.platformBrowser));
10
}(this, (function (exports,_angular_compiler_testing,_angular_core,_angular_core_testing,_angular_platformBrowserDynamic,_angular_platformBrowser_testing,_angular_platformBrowser) { 'use strict';
11

    
12
/*! *****************************************************************************
13
Copyright (c) Microsoft Corporation. All rights reserved.
14
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
15
this file except in compliance with the License. You may obtain a copy of the
16
License at http://www.apache.org/licenses/LICENSE-2.0
17

    
18
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
20
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
21
MERCHANTABLITY OR NON-INFRINGEMENT.
22

    
23
See the Apache Version 2.0 License for specific language governing permissions
24
and limitations under the License.
25
***************************************************************************** */
26
/* global Reflect, Promise */
27

    
28
var extendStatics = Object.setPrototypeOf ||
29
    ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
30
    function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
31

    
32
function __extends(d, b) {
33
    extendStatics(d, b);
34
    function __() { this.constructor = d; }
35
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36
}
37

    
38
/**
39
 * @license Angular v4.4.6
40
 * (c) 2010-2017 Google, Inc. https://angular.io/
41
 * License: MIT
42
 */
43
/**
44
 * @license
45
 * Copyright Google Inc. All Rights Reserved.
46
 *
47
 * Use of this source code is governed by an MIT-style license that can be
48
 * found in the LICENSE file at https://angular.io/license
49
 */
50
/**
51
 * A DOM based implementation of the TestComponentRenderer.
52
 */
53
var DOMTestComponentRenderer = (function (_super) {
54
    __extends(DOMTestComponentRenderer, _super);
55
    function DOMTestComponentRenderer(_doc /** TODO #9100 */) {
56
        var _this = _super.call(this) || this;
57
        _this._doc = _doc; /** TODO #9100 */
58
        return _this;
59
    }
60
    DOMTestComponentRenderer.prototype.insertRootElement = function (rootElId) {
61
        var rootEl = _angular_platformBrowser.ɵgetDOM().firstChild(_angular_platformBrowser.ɵgetDOM().content(_angular_platformBrowser.ɵgetDOM().createTemplate("<div id=\"" + rootElId + "\"></div>")));
62
        // TODO(juliemr): can/should this be optional?
63
        var oldRoots = _angular_platformBrowser.ɵgetDOM().querySelectorAll(this._doc, '[id^=root]');
64
        for (var i = 0; i < oldRoots.length; i++) {
65
            _angular_platformBrowser.ɵgetDOM().remove(oldRoots[i]);
66
        }
67
        _angular_platformBrowser.ɵgetDOM().appendChild(this._doc.body, rootEl);
68
    };
69
    return DOMTestComponentRenderer;
70
}(_angular_core_testing.TestComponentRenderer));
71
DOMTestComponentRenderer.decorators = [
72
    { type: _angular_core.Injectable },
73
];
74
/** @nocollapse */
75
DOMTestComponentRenderer.ctorParameters = function () { return [
76
    { type: undefined, decorators: [{ type: _angular_core.Inject, args: [_angular_platformBrowser.DOCUMENT,] },] },
77
]; };
78
/**
79
 * @license
80
 * Copyright Google Inc. All Rights Reserved.
81
 *
82
 * Use of this source code is governed by an MIT-style license that can be
83
 * found in the LICENSE file at https://angular.io/license
84
 */
85
/**
86
 * @license
87
 * Copyright Google Inc. All Rights Reserved.
88
 *
89
 * Use of this source code is governed by an MIT-style license that can be
90
 * found in the LICENSE file at https://angular.io/license
91
 */
92
/**
93
 * @stable
94
 */
95
var platformBrowserDynamicTesting = _angular_core.createPlatformFactory(_angular_compiler_testing.platformCoreDynamicTesting, 'browserDynamicTesting', _angular_platformBrowserDynamic.ɵINTERNAL_BROWSER_DYNAMIC_PLATFORM_PROVIDERS);
96
/**
97
 * NgModule for testing.
98
 *
99
 * @stable
100
 */
101
var BrowserDynamicTestingModule = (function () {
102
    function BrowserDynamicTestingModule() {
103
    }
104
    return BrowserDynamicTestingModule;
105
}());
106
BrowserDynamicTestingModule.decorators = [
107
    { type: _angular_core.NgModule, args: [{
108
                exports: [_angular_platformBrowser_testing.BrowserTestingModule],
109
                providers: [
110
                    { provide: _angular_core_testing.TestComponentRenderer, useClass: DOMTestComponentRenderer },
111
                ]
112
            },] },
113
];
114
/** @nocollapse */
115
BrowserDynamicTestingModule.ctorParameters = function () { return []; };
116

    
117
exports.platformBrowserDynamicTesting = platformBrowserDynamicTesting;
118
exports.BrowserDynamicTestingModule = BrowserDynamicTestingModule;
119
exports.ɵDOMTestComponentRenderer = DOMTestComponentRenderer;
120

    
121
Object.defineProperty(exports, '__esModule', { value: true });
122

    
123
})));
124
//# sourceMappingURL=platform-browser-dynamic-testing.umd.js.map
(1-1/8)