Front end of the Slack clone application.

testing.js 7.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. /**
  2. * @license Angular v5.2.11
  3. * (c) 2010-2018 Google, Inc. https://angular.io/
  4. * License: MIT
  5. */
  6. import { APP_ID, NgModule, NgZone, PLATFORM_INITIALIZER, createPlatformFactory, platformCore, ɵglobal } from '@angular/core';
  7. import { BrowserModule, ɵBrowserDomAdapter, ɵELEMENT_PROBE_PROVIDERS, ɵgetDOM } from '@angular/platform-browser';
  8. /**
  9. * @fileoverview added by tsickle
  10. * @suppress {checkTypes} checked by tsc
  11. */
  12. /**
  13. * @license
  14. * Copyright Google Inc. All Rights Reserved.
  15. *
  16. * Use of this source code is governed by an MIT-style license that can be
  17. * found in the LICENSE file at https://angular.io/license
  18. */
  19. var browserDetection;
  20. var BrowserDetection = /** @class */ (function () {
  21. function BrowserDetection(ua) {
  22. this._overrideUa = ua;
  23. }
  24. Object.defineProperty(BrowserDetection.prototype, "_ua", {
  25. get: /**
  26. * @return {?}
  27. */
  28. function () {
  29. if (typeof this._overrideUa === 'string') {
  30. return this._overrideUa;
  31. }
  32. return ɵgetDOM() ? ɵgetDOM().getUserAgent() : '';
  33. },
  34. enumerable: true,
  35. configurable: true
  36. });
  37. /**
  38. * @return {?}
  39. */
  40. BrowserDetection.setup = /**
  41. * @return {?}
  42. */
  43. function () { browserDetection = new BrowserDetection(null); };
  44. Object.defineProperty(BrowserDetection.prototype, "isFirefox", {
  45. get: /**
  46. * @return {?}
  47. */
  48. function () { return this._ua.indexOf('Firefox') > -1; },
  49. enumerable: true,
  50. configurable: true
  51. });
  52. Object.defineProperty(BrowserDetection.prototype, "isAndroid", {
  53. get: /**
  54. * @return {?}
  55. */
  56. function () {
  57. return this._ua.indexOf('Mozilla/5.0') > -1 && this._ua.indexOf('Android') > -1 &&
  58. this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Chrome') == -1 &&
  59. this._ua.indexOf('IEMobile') == -1;
  60. },
  61. enumerable: true,
  62. configurable: true
  63. });
  64. Object.defineProperty(BrowserDetection.prototype, "isEdge", {
  65. get: /**
  66. * @return {?}
  67. */
  68. function () { return this._ua.indexOf('Edge') > -1; },
  69. enumerable: true,
  70. configurable: true
  71. });
  72. Object.defineProperty(BrowserDetection.prototype, "isIE", {
  73. get: /**
  74. * @return {?}
  75. */
  76. function () { return this._ua.indexOf('Trident') > -1; },
  77. enumerable: true,
  78. configurable: true
  79. });
  80. Object.defineProperty(BrowserDetection.prototype, "isWebkit", {
  81. get: /**
  82. * @return {?}
  83. */
  84. function () {
  85. return this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Edge') == -1 &&
  86. this._ua.indexOf('IEMobile') == -1;
  87. },
  88. enumerable: true,
  89. configurable: true
  90. });
  91. Object.defineProperty(BrowserDetection.prototype, "isIOS7", {
  92. get: /**
  93. * @return {?}
  94. */
  95. function () {
  96. return (this._ua.indexOf('iPhone OS 7') > -1 || this._ua.indexOf('iPad OS 7') > -1) &&
  97. this._ua.indexOf('IEMobile') == -1;
  98. },
  99. enumerable: true,
  100. configurable: true
  101. });
  102. Object.defineProperty(BrowserDetection.prototype, "isSlow", {
  103. get: /**
  104. * @return {?}
  105. */
  106. function () { return this.isAndroid || this.isIE || this.isIOS7; },
  107. enumerable: true,
  108. configurable: true
  109. });
  110. Object.defineProperty(BrowserDetection.prototype, "supportsNativeIntlApi", {
  111. // The Intl API is only natively supported in Chrome, Firefox, IE11 and Edge.
  112. // This detector is needed in tests to make the difference between:
  113. // 1) IE11/Edge: they have a native Intl API, but with some discrepancies
  114. // 2) IE9/IE10: they use the polyfill, and so no discrepancies
  115. get: /**
  116. * @return {?}
  117. */
  118. function () {
  119. return !!(/** @type {?} */ (ɵglobal)).Intl && (/** @type {?} */ (ɵglobal)).Intl !== (/** @type {?} */ (ɵglobal)).IntlPolyfill;
  120. },
  121. enumerable: true,
  122. configurable: true
  123. });
  124. Object.defineProperty(BrowserDetection.prototype, "isChromeDesktop", {
  125. get: /**
  126. * @return {?}
  127. */
  128. function () {
  129. return this._ua.indexOf('Chrome') > -1 && this._ua.indexOf('Mobile Safari') == -1 &&
  130. this._ua.indexOf('Edge') == -1;
  131. },
  132. enumerable: true,
  133. configurable: true
  134. });
  135. Object.defineProperty(BrowserDetection.prototype, "isOldChrome", {
  136. // "Old Chrome" means Chrome 3X, where there are some discrepancies in the Intl API.
  137. // Android 4.4 and 5.X have such browsers by default (respectively 30 and 39).
  138. get: /**
  139. * @return {?}
  140. */
  141. function () {
  142. return this._ua.indexOf('Chrome') > -1 && this._ua.indexOf('Chrome/3') > -1 &&
  143. this._ua.indexOf('Edge') == -1;
  144. },
  145. enumerable: true,
  146. configurable: true
  147. });
  148. return BrowserDetection;
  149. }());
  150. BrowserDetection.setup();
  151. /**
  152. * @param {?} element
  153. * @param {?} eventType
  154. * @return {?}
  155. */
  156. /**
  157. * @param {?} html
  158. * @return {?}
  159. */
  160. /**
  161. * @param {?} css
  162. * @return {?}
  163. */
  164. /**
  165. * @param {?} el
  166. * @return {?}
  167. */
  168. /**
  169. * @return {?}
  170. */
  171. function createNgZone() {
  172. return new NgZone({ enableLongStackTrace: true });
  173. }
  174. /**
  175. * @fileoverview added by tsickle
  176. * @suppress {checkTypes} checked by tsc
  177. */
  178. /**
  179. * @return {?}
  180. */
  181. function initBrowserTests() {
  182. ɵBrowserDomAdapter.makeCurrent();
  183. BrowserDetection.setup();
  184. }
  185. var _TEST_BROWSER_PLATFORM_PROVIDERS = [{ provide: PLATFORM_INITIALIZER, useValue: initBrowserTests, multi: true }];
  186. /**
  187. * Platform for testing
  188. *
  189. * \@stable
  190. */
  191. var platformBrowserTesting = createPlatformFactory(platformCore, 'browserTesting', _TEST_BROWSER_PLATFORM_PROVIDERS);
  192. var ɵ0 = createNgZone;
  193. /**
  194. * NgModule for testing.
  195. *
  196. * \@stable
  197. */
  198. var BrowserTestingModule = /** @class */ (function () {
  199. function BrowserTestingModule() {
  200. }
  201. BrowserTestingModule.decorators = [
  202. { type: NgModule, args: [{
  203. exports: [BrowserModule],
  204. providers: [
  205. { provide: APP_ID, useValue: 'a' },
  206. ɵELEMENT_PROBE_PROVIDERS,
  207. { provide: NgZone, useFactory: ɵ0 },
  208. ]
  209. },] },
  210. ];
  211. /** @nocollapse */
  212. BrowserTestingModule.ctorParameters = function () { return []; };
  213. return BrowserTestingModule;
  214. }());
  215. /**
  216. * @fileoverview added by tsickle
  217. * @suppress {checkTypes} checked by tsc
  218. */
  219. /**
  220. * @license
  221. * Copyright Google Inc. All Rights Reserved.
  222. *
  223. * Use of this source code is governed by an MIT-style license that can be
  224. * found in the LICENSE file at https://angular.io/license
  225. */
  226. /**
  227. * @module
  228. * @description
  229. * Entry point for all public APIs of the platform-browser/testing package.
  230. */
  231. /**
  232. * @fileoverview added by tsickle
  233. * @suppress {checkTypes} checked by tsc
  234. */
  235. /**
  236. * @license
  237. * Copyright Google Inc. All Rights Reserved.
  238. *
  239. * Use of this source code is governed by an MIT-style license that can be
  240. * found in the LICENSE file at https://angular.io/license
  241. */
  242. /**
  243. * @module
  244. * @description
  245. * Entry point for all public APIs of this package.
  246. */
  247. /**
  248. * @fileoverview added by tsickle
  249. * @suppress {checkTypes} checked by tsc
  250. */
  251. /**
  252. * Generated bundle index. Do not edit.
  253. */
  254. export { platformBrowserTesting, BrowserTestingModule, createNgZone as ɵa };
  255. //# sourceMappingURL=testing.js.map