Front end of the Slack clone application.

testing.js 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. let browserDetection;
  20. class BrowserDetection {
  21. /**
  22. * @return {?}
  23. */
  24. get _ua() {
  25. if (typeof this._overrideUa === 'string') {
  26. return this._overrideUa;
  27. }
  28. return ɵgetDOM() ? ɵgetDOM().getUserAgent() : '';
  29. }
  30. /**
  31. * @return {?}
  32. */
  33. static setup() { browserDetection = new BrowserDetection(null); }
  34. /**
  35. * @param {?} ua
  36. */
  37. constructor(ua) { this._overrideUa = ua; }
  38. /**
  39. * @return {?}
  40. */
  41. get isFirefox() { return this._ua.indexOf('Firefox') > -1; }
  42. /**
  43. * @return {?}
  44. */
  45. get isAndroid() {
  46. return this._ua.indexOf('Mozilla/5.0') > -1 && this._ua.indexOf('Android') > -1 &&
  47. this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Chrome') == -1 &&
  48. this._ua.indexOf('IEMobile') == -1;
  49. }
  50. /**
  51. * @return {?}
  52. */
  53. get isEdge() { return this._ua.indexOf('Edge') > -1; }
  54. /**
  55. * @return {?}
  56. */
  57. get isIE() { return this._ua.indexOf('Trident') > -1; }
  58. /**
  59. * @return {?}
  60. */
  61. get isWebkit() {
  62. return this._ua.indexOf('AppleWebKit') > -1 && this._ua.indexOf('Edge') == -1 &&
  63. this._ua.indexOf('IEMobile') == -1;
  64. }
  65. /**
  66. * @return {?}
  67. */
  68. get isIOS7() {
  69. return (this._ua.indexOf('iPhone OS 7') > -1 || this._ua.indexOf('iPad OS 7') > -1) &&
  70. this._ua.indexOf('IEMobile') == -1;
  71. }
  72. /**
  73. * @return {?}
  74. */
  75. get isSlow() { return this.isAndroid || this.isIE || this.isIOS7; }
  76. /**
  77. * @return {?}
  78. */
  79. get supportsNativeIntlApi() {
  80. return !!(/** @type {?} */ (ɵglobal)).Intl && (/** @type {?} */ (ɵglobal)).Intl !== (/** @type {?} */ (ɵglobal)).IntlPolyfill;
  81. }
  82. /**
  83. * @return {?}
  84. */
  85. get isChromeDesktop() {
  86. return this._ua.indexOf('Chrome') > -1 && this._ua.indexOf('Mobile Safari') == -1 &&
  87. this._ua.indexOf('Edge') == -1;
  88. }
  89. /**
  90. * @return {?}
  91. */
  92. get isOldChrome() {
  93. return this._ua.indexOf('Chrome') > -1 && this._ua.indexOf('Chrome/3') > -1 &&
  94. this._ua.indexOf('Edge') == -1;
  95. }
  96. }
  97. BrowserDetection.setup();
  98. /**
  99. * @param {?} element
  100. * @param {?} eventType
  101. * @return {?}
  102. */
  103. /**
  104. * @param {?} html
  105. * @return {?}
  106. */
  107. /**
  108. * @param {?} css
  109. * @return {?}
  110. */
  111. /**
  112. * @param {?} el
  113. * @return {?}
  114. */
  115. /**
  116. * @return {?}
  117. */
  118. function createNgZone() {
  119. return new NgZone({ enableLongStackTrace: true });
  120. }
  121. /**
  122. * @fileoverview added by tsickle
  123. * @suppress {checkTypes} checked by tsc
  124. */
  125. /**
  126. * @return {?}
  127. */
  128. function initBrowserTests() {
  129. ɵBrowserDomAdapter.makeCurrent();
  130. BrowserDetection.setup();
  131. }
  132. const _TEST_BROWSER_PLATFORM_PROVIDERS = [{ provide: PLATFORM_INITIALIZER, useValue: initBrowserTests, multi: true }];
  133. /**
  134. * Platform for testing
  135. *
  136. * \@stable
  137. */
  138. const platformBrowserTesting = createPlatformFactory(platformCore, 'browserTesting', _TEST_BROWSER_PLATFORM_PROVIDERS);
  139. const ɵ0 = createNgZone;
  140. /**
  141. * NgModule for testing.
  142. *
  143. * \@stable
  144. */
  145. class BrowserTestingModule {
  146. }
  147. BrowserTestingModule.decorators = [
  148. { type: NgModule, args: [{
  149. exports: [BrowserModule],
  150. providers: [
  151. { provide: APP_ID, useValue: 'a' },
  152. ɵELEMENT_PROBE_PROVIDERS,
  153. { provide: NgZone, useFactory: ɵ0 },
  154. ]
  155. },] },
  156. ];
  157. /** @nocollapse */
  158. BrowserTestingModule.ctorParameters = () => [];
  159. /**
  160. * @fileoverview added by tsickle
  161. * @suppress {checkTypes} checked by tsc
  162. */
  163. /**
  164. * @license
  165. * Copyright Google Inc. All Rights Reserved.
  166. *
  167. * Use of this source code is governed by an MIT-style license that can be
  168. * found in the LICENSE file at https://angular.io/license
  169. */
  170. /**
  171. * @module
  172. * @description
  173. * Entry point for all public APIs of the platform-browser/testing package.
  174. */
  175. /**
  176. * @fileoverview added by tsickle
  177. * @suppress {checkTypes} checked by tsc
  178. */
  179. /**
  180. * @license
  181. * Copyright Google Inc. All Rights Reserved.
  182. *
  183. * Use of this source code is governed by an MIT-style license that can be
  184. * found in the LICENSE file at https://angular.io/license
  185. */
  186. /**
  187. * @module
  188. * @description
  189. * Entry point for all public APIs of this package.
  190. */
  191. /**
  192. * @fileoverview added by tsickle
  193. * @suppress {checkTypes} checked by tsc
  194. */
  195. /**
  196. * Generated bundle index. Do not edit.
  197. */
  198. export { platformBrowserTesting, BrowserTestingModule, createNgZone as ɵa };
  199. //# sourceMappingURL=testing.js.map