1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | (function (global, factory) {
|
8 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/platform-browser'), require('@angular/common')) :
|
9 | typeof define === 'function' && define.amd ? define('@angular/platform-browser/testing', ['exports', '@angular/core', '@angular/platform-browser', '@angular/common'], factory) :
|
10 | (global = global || self, factory((global.ng = global.ng || {}, global.ng.platformBrowser = global.ng.platformBrowser || {}, global.ng.platformBrowser.testing = {}), global.ng.core, global.ng.platformBrowser, global.ng.common));
|
11 | }(this, (function (exports, core, platformBrowser, common) { 'use strict';
|
12 |
|
13 | |
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | var extendStatics = function(d, b) {
|
30 | extendStatics = Object.setPrototypeOf ||
|
31 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
32 | function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
33 | return extendStatics(d, b);
|
34 | };
|
35 |
|
36 | function __extends(d, b) {
|
37 | extendStatics(d, b);
|
38 | function __() { this.constructor = d; }
|
39 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
40 | }
|
41 |
|
42 | var __assign = function() {
|
43 | __assign = Object.assign || function __assign(t) {
|
44 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
45 | s = arguments[i];
|
46 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
47 | }
|
48 | return t;
|
49 | };
|
50 | return __assign.apply(this, arguments);
|
51 | };
|
52 |
|
53 | function __rest(s, e) {
|
54 | var t = {};
|
55 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
56 | t[p] = s[p];
|
57 | if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
58 | for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
59 | if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
60 | t[p[i]] = s[p[i]];
|
61 | }
|
62 | return t;
|
63 | }
|
64 |
|
65 | function __decorate(decorators, target, key, desc) {
|
66 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
67 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
68 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
69 | return c > 3 && r && Object.defineProperty(target, key, r), r;
|
70 | }
|
71 |
|
72 | function __param(paramIndex, decorator) {
|
73 | return function (target, key) { decorator(target, key, paramIndex); }
|
74 | }
|
75 |
|
76 | function __metadata(metadataKey, metadataValue) {
|
77 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
78 | }
|
79 |
|
80 | function __awaiter(thisArg, _arguments, P, generator) {
|
81 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
82 | return new (P || (P = Promise))(function (resolve, reject) {
|
83 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
84 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
85 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
86 | step((generator = generator.apply(thisArg, _arguments || [])).next());
|
87 | });
|
88 | }
|
89 |
|
90 | function __generator(thisArg, body) {
|
91 | var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
92 | return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
93 | function verb(n) { return function (v) { return step([n, v]); }; }
|
94 | function step(op) {
|
95 | if (f) throw new TypeError("Generator is already executing.");
|
96 | while (_) try {
|
97 | if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
98 | if (y = 0, t) op = [op[0] & 2, t.value];
|
99 | switch (op[0]) {
|
100 | case 0: case 1: t = op; break;
|
101 | case 4: _.label++; return { value: op[1], done: false };
|
102 | case 5: _.label++; y = op[1]; op = [0]; continue;
|
103 | case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
104 | default:
|
105 | if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
106 | if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
107 | if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
108 | if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
109 | if (t[2]) _.ops.pop();
|
110 | _.trys.pop(); continue;
|
111 | }
|
112 | op = body.call(thisArg, _);
|
113 | } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
114 | if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
115 | }
|
116 | }
|
117 |
|
118 | var __createBinding = Object.create ? (function(o, m, k, k2) {
|
119 | if (k2 === undefined) k2 = k;
|
120 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
121 | }) : (function(o, m, k, k2) {
|
122 | if (k2 === undefined) k2 = k;
|
123 | o[k2] = m[k];
|
124 | });
|
125 |
|
126 | function __exportStar(m, exports) {
|
127 | for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
128 | }
|
129 |
|
130 | function __values(o) {
|
131 | var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
132 | if (m) return m.call(o);
|
133 | if (o && typeof o.length === "number") return {
|
134 | next: function () {
|
135 | if (o && i >= o.length) o = void 0;
|
136 | return { value: o && o[i++], done: !o };
|
137 | }
|
138 | };
|
139 | throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
140 | }
|
141 |
|
142 | function __read(o, n) {
|
143 | var m = typeof Symbol === "function" && o[Symbol.iterator];
|
144 | if (!m) return o;
|
145 | var i = m.call(o), r, ar = [], e;
|
146 | try {
|
147 | while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
148 | }
|
149 | catch (error) { e = { error: error }; }
|
150 | finally {
|
151 | try {
|
152 | if (r && !r.done && (m = i["return"])) m.call(i);
|
153 | }
|
154 | finally { if (e) throw e.error; }
|
155 | }
|
156 | return ar;
|
157 | }
|
158 |
|
159 | function __spread() {
|
160 | for (var ar = [], i = 0; i < arguments.length; i++)
|
161 | ar = ar.concat(__read(arguments[i]));
|
162 | return ar;
|
163 | }
|
164 |
|
165 | function __spreadArrays() {
|
166 | for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
167 | for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
168 | for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
169 | r[k] = a[j];
|
170 | return r;
|
171 | };
|
172 |
|
173 | function __await(v) {
|
174 | return this instanceof __await ? (this.v = v, this) : new __await(v);
|
175 | }
|
176 |
|
177 | function __asyncGenerator(thisArg, _arguments, generator) {
|
178 | if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
179 | var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
180 | return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
181 | function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
182 | function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
183 | function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
184 | function fulfill(value) { resume("next", value); }
|
185 | function reject(value) { resume("throw", value); }
|
186 | function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
187 | }
|
188 |
|
189 | function __asyncDelegator(o) {
|
190 | var i, p;
|
191 | return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
192 | function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
193 | }
|
194 |
|
195 | function __asyncValues(o) {
|
196 | if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
197 | var m = o[Symbol.asyncIterator], i;
|
198 | return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
199 | function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
200 | function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
201 | }
|
202 |
|
203 | function __makeTemplateObject(cooked, raw) {
|
204 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
205 | return cooked;
|
206 | };
|
207 |
|
208 | var __setModuleDefault = Object.create ? (function(o, v) {
|
209 | Object.defineProperty(o, "default", { enumerable: true, value: v });
|
210 | }) : function(o, v) {
|
211 | o["default"] = v;
|
212 | };
|
213 |
|
214 | function __importStar(mod) {
|
215 | if (mod && mod.__esModule) return mod;
|
216 | var result = {};
|
217 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
218 | __setModuleDefault(result, mod);
|
219 | return result;
|
220 | }
|
221 |
|
222 | function __importDefault(mod) {
|
223 | return (mod && mod.__esModule) ? mod : { default: mod };
|
224 | }
|
225 |
|
226 | function __classPrivateFieldGet(receiver, privateMap) {
|
227 | if (!privateMap.has(receiver)) {
|
228 | throw new TypeError("attempted to get private field on non-instance");
|
229 | }
|
230 | return privateMap.get(receiver);
|
231 | }
|
232 |
|
233 | function __classPrivateFieldSet(receiver, privateMap, value) {
|
234 | if (!privateMap.has(receiver)) {
|
235 | throw new TypeError("attempted to set private field on non-instance");
|
236 | }
|
237 | privateMap.set(receiver, value);
|
238 | return value;
|
239 | }
|
240 |
|
241 | |
242 |
|
243 |
|
244 |
|
245 |
|
246 |
|
247 |
|
248 | var BrowserDetection = (function () {
|
249 | function BrowserDetection(ua) {
|
250 | this._overrideUa = ua;
|
251 | }
|
252 | Object.defineProperty(BrowserDetection.prototype, "_ua", {
|
253 | get: function () {
|
254 | if (typeof this._overrideUa === 'string') {
|
255 | return this._overrideUa;
|
256 | }
|
257 | return common.ɵgetDOM() ? common.ɵgetDOM().getUserAgent() : '';
|
258 | },
|
259 | enumerable: false,
|
260 | configurable: true
|
261 | });
|
262 | BrowserDetection.setup = function () {
|
263 | return new BrowserDetection(null);
|
264 | };
|
265 | Object.defineProperty(BrowserDetection.prototype, "isFirefox", {
|
266 | get: function () {
|
267 | return this._ua.indexOf('Firefox') > -1;
|
268 | },
|
269 | enumerable: false,
|
270 | configurable: true
|
271 | });
|
272 | Object.defineProperty(BrowserDetection.prototype, "isAndroid", {
|
273 | get: function () {
|
274 | return this._ua.indexOf('Mozilla/5.0') > -1 && this._ua.indexOf('Android') > -1 &&
|
275 | this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Chrome') == -1 &&
|
276 | this._ua.indexOf('IEMobile') == -1;
|
277 | },
|
278 | enumerable: false,
|
279 | configurable: true
|
280 | });
|
281 | Object.defineProperty(BrowserDetection.prototype, "isEdge", {
|
282 | get: function () {
|
283 | return this._ua.indexOf('Edge') > -1;
|
284 | },
|
285 | enumerable: false,
|
286 | configurable: true
|
287 | });
|
288 | Object.defineProperty(BrowserDetection.prototype, "isIE", {
|
289 | get: function () {
|
290 | return this._ua.indexOf('Trident') > -1;
|
291 | },
|
292 | enumerable: false,
|
293 | configurable: true
|
294 | });
|
295 | Object.defineProperty(BrowserDetection.prototype, "isWebkit", {
|
296 | get: function () {
|
297 | return this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Edge') == -1 &&
|
298 | this._ua.indexOf('IEMobile') == -1;
|
299 | },
|
300 | enumerable: false,
|
301 | configurable: true
|
302 | });
|
303 | Object.defineProperty(BrowserDetection.prototype, "isIOS7", {
|
304 | get: function () {
|
305 | return (this._ua.indexOf('iPhone OS 7') > -1 || this._ua.indexOf('iPad OS 7') > -1) &&
|
306 | this._ua.indexOf('IEMobile') == -1;
|
307 | },
|
308 | enumerable: false,
|
309 | configurable: true
|
310 | });
|
311 | Object.defineProperty(BrowserDetection.prototype, "isSlow", {
|
312 | get: function () {
|
313 | return this.isAndroid || this.isIE || this.isIOS7;
|
314 | },
|
315 | enumerable: false,
|
316 | configurable: true
|
317 | });
|
318 | Object.defineProperty(BrowserDetection.prototype, "supportsNativeIntlApi", {
|
319 |
|
320 |
|
321 |
|
322 |
|
323 | get: function () {
|
324 | return !!core.ɵglobal.Intl && core.ɵglobal.Intl !== core.ɵglobal.IntlPolyfill;
|
325 | },
|
326 | enumerable: false,
|
327 | configurable: true
|
328 | });
|
329 | Object.defineProperty(BrowserDetection.prototype, "isChromeDesktop", {
|
330 | get: function () {
|
331 | return this._ua.indexOf('Chrome') > -1 && this._ua.indexOf('Mobile Safari') == -1 &&
|
332 | this._ua.indexOf('Edge') == -1;
|
333 | },
|
334 | enumerable: false,
|
335 | configurable: true
|
336 | });
|
337 | Object.defineProperty(BrowserDetection.prototype, "isOldChrome", {
|
338 |
|
339 |
|
340 | get: function () {
|
341 | return this._ua.indexOf('Chrome') > -1 && this._ua.indexOf('Chrome/3') > -1 &&
|
342 | this._ua.indexOf('Edge') == -1;
|
343 | },
|
344 | enumerable: false,
|
345 | configurable: true
|
346 | });
|
347 | Object.defineProperty(BrowserDetection.prototype, "supportsCustomElements", {
|
348 | get: function () {
|
349 | return (typeof core.ɵglobal.customElements !== 'undefined');
|
350 | },
|
351 | enumerable: false,
|
352 | configurable: true
|
353 | });
|
354 | Object.defineProperty(BrowserDetection.prototype, "supportsDeprecatedCustomCustomElementsV0", {
|
355 | get: function () {
|
356 | return (typeof document.registerElement !== 'undefined');
|
357 | },
|
358 | enumerable: false,
|
359 | configurable: true
|
360 | });
|
361 | Object.defineProperty(BrowserDetection.prototype, "supportsRegExUnicodeFlag", {
|
362 | get: function () {
|
363 | return RegExp.prototype.hasOwnProperty('unicode');
|
364 | },
|
365 | enumerable: false,
|
366 | configurable: true
|
367 | });
|
368 | Object.defineProperty(BrowserDetection.prototype, "supportsShadowDom", {
|
369 | get: function () {
|
370 | var testEl = document.createElement('div');
|
371 | return (typeof testEl.attachShadow !== 'undefined');
|
372 | },
|
373 | enumerable: false,
|
374 | configurable: true
|
375 | });
|
376 | Object.defineProperty(BrowserDetection.prototype, "supportsDeprecatedShadowDomV0", {
|
377 | get: function () {
|
378 | var testEl = document.createElement('div');
|
379 | return (typeof testEl.createShadowRoot !== 'undefined');
|
380 | },
|
381 | enumerable: false,
|
382 | configurable: true
|
383 | });
|
384 | return BrowserDetection;
|
385 | }());
|
386 | var browserDetection = BrowserDetection.setup();
|
387 | function dispatchEvent(element, eventType) {
|
388 | var evt = common.ɵgetDOM().getDefaultDocument().createEvent('Event');
|
389 | evt.initEvent(eventType, true, true);
|
390 | common.ɵgetDOM().dispatchEvent(element, evt);
|
391 | }
|
392 | function createMouseEvent(eventType) {
|
393 | var evt = common.ɵgetDOM().getDefaultDocument().createEvent('MouseEvent');
|
394 | evt.initEvent(eventType, true, true);
|
395 | return evt;
|
396 | }
|
397 | function el(html) {
|
398 | return getContent(createTemplate(html)).firstChild;
|
399 | }
|
400 | function normalizeCSS(css) {
|
401 | return css.replace(/\s+/g, ' ')
|
402 | .replace(/:\s/g, ':')
|
403 | .replace(/'/g, '"')
|
404 | .replace(/ }/g, '}')
|
405 | .replace(/url\((\"|\s)(.+)(\"|\s)\)(\s*)/g, function () {
|
406 | var match = [];
|
407 | for (var _i = 0; _i < arguments.length; _i++) {
|
408 | match[_i] = arguments[_i];
|
409 | }
|
410 | return "url(\"" + match[2] + "\")";
|
411 | })
|
412 | .replace(/\[(.+)=([^"\]]+)\]/g, function () {
|
413 | var match = [];
|
414 | for (var _i = 0; _i < arguments.length; _i++) {
|
415 | match[_i] = arguments[_i];
|
416 | }
|
417 | return "[" + match[1] + "=\"" + match[2] + "\"]";
|
418 | });
|
419 | }
|
420 | function getAttributeMap(element) {
|
421 | var res = new Map();
|
422 | var elAttrs = element.attributes;
|
423 | for (var i = 0; i < elAttrs.length; i++) {
|
424 | var attrib = elAttrs.item(i);
|
425 | res.set(attrib.name, attrib.value);
|
426 | }
|
427 | return res;
|
428 | }
|
429 | var _selfClosingTags = ['br', 'hr', 'input'];
|
430 | function stringifyElement(el /** TODO #9100 */) {
|
431 | var e_1, _a;
|
432 | var result = '';
|
433 | if (common.ɵgetDOM().isElementNode(el)) {
|
434 | var tagName = el.tagName.toLowerCase();
|
435 |
|
436 | result += "<" + tagName;
|
437 |
|
438 | var attributeMap = getAttributeMap(el);
|
439 | var sortedKeys = Array.from(attributeMap.keys()).sort();
|
440 | try {
|
441 | for (var sortedKeys_1 = __values(sortedKeys), sortedKeys_1_1 = sortedKeys_1.next(); !sortedKeys_1_1.done; sortedKeys_1_1 = sortedKeys_1.next()) {
|
442 | var key = sortedKeys_1_1.value;
|
443 | var lowerCaseKey = key.toLowerCase();
|
444 | var attValue = attributeMap.get(key);
|
445 | if (typeof attValue !== 'string') {
|
446 | result += " " + lowerCaseKey;
|
447 | }
|
448 | else {
|
449 |
|
450 | if (lowerCaseKey === 'style') {
|
451 | attValue = attValue.split(/; ?/).filter(function (s) { return !!s; }).sort().map(function (s) { return s + ";"; }).join(' ');
|
452 | }
|
453 | result += " " + lowerCaseKey + "=\"" + attValue + "\"";
|
454 | }
|
455 | }
|
456 | }
|
457 | catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
458 | finally {
|
459 | try {
|
460 | if (sortedKeys_1_1 && !sortedKeys_1_1.done && (_a = sortedKeys_1.return)) _a.call(sortedKeys_1);
|
461 | }
|
462 | finally { if (e_1) throw e_1.error; }
|
463 | }
|
464 | result += '>';
|
465 |
|
466 | var childrenRoot = templateAwareRoot(el);
|
467 | var children = childrenRoot ? childrenRoot.childNodes : [];
|
468 | for (var j = 0; j < children.length; j++) {
|
469 | result += stringifyElement(children[j]);
|
470 | }
|
471 |
|
472 | if (_selfClosingTags.indexOf(tagName) == -1) {
|
473 | result += "</" + tagName + ">";
|
474 | }
|
475 | }
|
476 | else if (isCommentNode(el)) {
|
477 | result += "<!--" + el.nodeValue + "-->";
|
478 | }
|
479 | else {
|
480 | result += el.textContent;
|
481 | }
|
482 | return result;
|
483 | }
|
484 | function createNgZone() {
|
485 | return new core.NgZone({ enableLongStackTrace: true, shouldCoalesceEventChangeDetection: false });
|
486 | }
|
487 | function isCommentNode(node) {
|
488 | return node.nodeType === Node.COMMENT_NODE;
|
489 | }
|
490 | function isTextNode(node) {
|
491 | return node.nodeType === Node.TEXT_NODE;
|
492 | }
|
493 | function getContent(node) {
|
494 | if ('content' in node) {
|
495 | return node.content;
|
496 | }
|
497 | else {
|
498 | return node;
|
499 | }
|
500 | }
|
501 | function templateAwareRoot(el) {
|
502 | return common.ɵgetDOM().isElementNode(el) && el.nodeName === 'TEMPLATE' ? getContent(el) : el;
|
503 | }
|
504 | function setCookie(name, value) {
|
505 |
|
506 |
|
507 | document.cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value);
|
508 | }
|
509 | function supportsWebAnimation() {
|
510 | return typeof Element.prototype['animate'] === 'function';
|
511 | }
|
512 | function hasStyle(element, styleName, styleValue) {
|
513 | var value = element.style[styleName] || '';
|
514 | return styleValue ? value == styleValue : value.length > 0;
|
515 | }
|
516 | function hasClass(element, className) {
|
517 | return element.classList.contains(className);
|
518 | }
|
519 | function sortedClassList(element) {
|
520 | return Array.prototype.slice.call(element.classList, 0).sort();
|
521 | }
|
522 | function createTemplate(html) {
|
523 | var t = common.ɵgetDOM().getDefaultDocument().createElement('template');
|
524 | t.innerHTML = html;
|
525 | return t;
|
526 | }
|
527 | function childNodesAsList(el) {
|
528 | var childNodes = el.childNodes;
|
529 | var res = [];
|
530 | for (var i = 0; i < childNodes.length; i++) {
|
531 | res[i] = childNodes[i];
|
532 | }
|
533 | return res;
|
534 | }
|
535 |
|
536 | |
537 |
|
538 |
|
539 |
|
540 |
|
541 |
|
542 |
|
543 | function initBrowserTests() {
|
544 | platformBrowser.ɵBrowserDomAdapter.makeCurrent();
|
545 | BrowserDetection.setup();
|
546 | }
|
547 | var _TEST_BROWSER_PLATFORM_PROVIDERS = [{ provide: core.PLATFORM_INITIALIZER, useValue: initBrowserTests, multi: true }];
|
548 | |
549 |
|
550 |
|
551 |
|
552 |
|
553 | var platformBrowserTesting = core.createPlatformFactory(core.platformCore, 'browserTesting', _TEST_BROWSER_PLATFORM_PROVIDERS);
|
554 | var ɵ0 = createNgZone;
|
555 | |
556 |
|
557 |
|
558 |
|
559 |
|
560 | var BrowserTestingModule = (function () {
|
561 | function BrowserTestingModule() {
|
562 | }
|
563 | BrowserTestingModule.decorators = [
|
564 | { type: core.NgModule, args: [{
|
565 | exports: [platformBrowser.BrowserModule],
|
566 | providers: [
|
567 | { provide: core.APP_ID, useValue: 'a' },
|
568 | platformBrowser.ɵELEMENT_PROBE_PROVIDERS,
|
569 | { provide: core.NgZone, useFactory: ɵ0 },
|
570 | ]
|
571 | },] }
|
572 | ];
|
573 | return BrowserTestingModule;
|
574 | }());
|
575 |
|
576 | |
577 |
|
578 |
|
579 |
|
580 |
|
581 |
|
582 |
|
583 |
|
584 | |
585 |
|
586 |
|
587 |
|
588 |
|
589 |
|
590 |
|
591 |
|
592 | |
593 |
|
594 |
|
595 |
|
596 |
|
597 |
|
598 |
|
599 |
|
600 | |
601 |
|
602 |
|
603 |
|
604 | exports.BrowserTestingModule = BrowserTestingModule;
|
605 | exports.platformBrowserTesting = platformBrowserTesting;
|
606 | exports.ɵ0 = ɵ0;
|
607 | exports.ɵangular_packages_platform_browser_testing_testing_a = createNgZone;
|
608 |
|
609 | Object.defineProperty(exports, '__esModule', { value: true });
|
610 |
|
611 | })));
|
612 |
|