ember-source 2.11.2 → 2.11.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 899d3c8b71efee639a84952e9065d3dc1dbabd8d
4
- data.tar.gz: ce7015365fdf3ad81d63ca5ef239844518efbcfc
3
+ metadata.gz: d901c12965c5d4de106da9ff28bd2d5a1b0dcc35
4
+ data.tar.gz: 8aa863a4de7d4f775fa1f0fad33ccfceb60563a4
5
5
  SHA512:
6
- metadata.gz: 1b100040ac0615820062517b56cbbd8e4836e1221d027daedf706b25e020f2246725d8635603aee3243cef58254753567d1a3a22d6cb2eb75d75f2bf9c2d9b1f
7
- data.tar.gz: 7a6133143b3c3f3b549c570c9094b88a9c59aca37b5838ab2a750bd0f063a1943c86cb9eb3d143ae6bf4c45e7bec8361d63e7bd807d1c9fd068a81205b5da617
6
+ metadata.gz: 50bf25b89198a62a882ace88ebcbd17d7243c946f13a7918e5bdddffbca5390c2f2a366f9b142d0db9d97029198d39a9dcc6744299e4825dd2206c3f342b68e2
7
+ data.tar.gz: 274d9be9e78ef5f4aa910dcda4dc5a139d604ad8ecedc99395a7807027b6398921ef9daaeca545cf1ccf077d0a0760d9e2335f84088f3d1fb20b69a900a855d0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.11.2
1
+ 2.11.3
@@ -6,7 +6,7 @@
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 2.11.2
9
+ * @version 2.11.3
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -164,7 +164,7 @@ function defaults(obj, defaults) {
164
164
  return obj;
165
165
  }
166
166
 
167
- babelHelpers = {
167
+ var babelHelpers = {
168
168
  inherits: inherits,
169
169
  taggedTemplateLiteralLoose: taggedTemplateLiteralLoose,
170
170
  slice: Array.prototype.slice,
@@ -4655,6 +4655,7 @@ enifed('ember-metal/error_handler', ['exports', 'ember-console', 'ember-metal/te
4655
4655
  exports.getOnerror = getOnerror;
4656
4656
  exports.setOnerror = setOnerror;
4657
4657
  exports.dispatchError = dispatchError;
4658
+ exports.getDispatchOverride = getDispatchOverride;
4658
4659
  exports.setDispatchOverride = setDispatchOverride;
4659
4660
 
4660
4661
  // To maintain stacktrace consistency across browsers
@@ -4695,6 +4696,10 @@ enifed('ember-metal/error_handler', ['exports', 'ember-console', 'ember-metal/te
4695
4696
 
4696
4697
  // allows testing adapter to override dispatch
4697
4698
 
4699
+ function getDispatchOverride() {
4700
+ return dispatchOverride;
4701
+ }
4702
+
4698
4703
  function setDispatchOverride(handler) {
4699
4704
  dispatchOverride = handler;
4700
4705
  }
@@ -9265,7 +9270,7 @@ enifed('ember-metal/run_loop', ['exports', 'ember-utils', 'ember-metal/debug', '
9265
9270
 
9266
9271
  var onErrorTarget = {
9267
9272
  get onerror() {
9268
- return _emberMetalError_handler.getOnerror();
9273
+ return _emberMetalError_handler.dispatchError;
9269
9274
  },
9270
9275
  set onerror(handler) {
9271
9276
  return _emberMetalError_handler.setOnerror(handler);
@@ -16235,9 +16240,9 @@ enifed('ember-runtime/mixins/observable', ['exports', 'ember-metal'], function (
16235
16240
  only a sender and key value as parameters or, if you aren't interested in
16236
16241
  any of these values, to write an observer that has no parameters at all.
16237
16242
  @method addObserver
16238
- @param {String} key The key to observer
16243
+ @param {String} key The key to observe
16239
16244
  @param {Object} target The target object to invoke
16240
- @param {String|Function} method The method to invoke.
16245
+ @param {String|Function} method The method to invoke
16241
16246
  @public
16242
16247
  */
16243
16248
  addObserver: function (key, target, method) {
@@ -16249,9 +16254,9 @@ enifed('ember-runtime/mixins/observable', ['exports', 'ember-metal'], function (
16249
16254
  the same key, target, and method you passed to `addObserver()` and your
16250
16255
  target will no longer receive notifications.
16251
16256
  @method removeObserver
16252
- @param {String} key The key to observer
16257
+ @param {String} key The key to observe
16253
16258
  @param {Object} target The target object to invoke
16254
- @param {String|Function} method The method to invoke.
16259
+ @param {String|Function} method The method to invoke
16255
16260
  @public
16256
16261
  */
16257
16262
  removeObserver: function (key, target, method) {
@@ -19414,7 +19419,7 @@ enifed("ember/features", ["exports"], function (exports) {
19414
19419
  enifed("ember/version", ["exports"], function (exports) {
19415
19420
  "use strict";
19416
19421
 
19417
- exports.default = "2.11.2";
19422
+ exports.default = "2.11.3";
19418
19423
  });
19419
19424
  enifed('rsvp', ['exports'], function (exports) {
19420
19425
  'use strict';
@@ -19838,6 +19843,7 @@ enifed('rsvp', ['exports'], function (exports) {
19838
19843
  } else {
19839
19844
  if (then$$ === GET_THEN_ERROR) {
19840
19845
  reject(promise, GET_THEN_ERROR.error);
19846
+ GET_THEN_ERROR.error = null;
19841
19847
  } else if (then$$ === undefined) {
19842
19848
  fulfill(promise, maybeThenable);
19843
19849
  } else if (isFunction(then$$)) {
@@ -19965,10 +19971,10 @@ enifed('rsvp', ['exports'], function (exports) {
19965
19971
  if (value === TRY_CATCH_ERROR) {
19966
19972
  failed = true;
19967
19973
  error = value.error;
19968
- value = null;
19974
+ value.error = null; // release
19969
19975
  } else {
19970
- succeeded = true;
19971
- }
19976
+ succeeded = true;
19977
+ }
19972
19978
 
19973
19979
  if (promise === value) {
19974
19980
  reject(promise, withOwnPromise());
@@ -20752,7 +20758,7 @@ enifed('rsvp', ['exports'], function (exports) {
20752
20758
  try {
20753
20759
  return findAuthor(); // succeed or fail
20754
20760
  } catch(error) {
20755
- return findOtherAuther();
20761
+ return findOtherAuthor();
20756
20762
  } finally {
20757
20763
  // always runs
20758
20764
  // doesn't affect the return value
@@ -20763,7 +20769,7 @@ enifed('rsvp', ['exports'], function (exports) {
20763
20769
 
20764
20770
  ```js
20765
20771
  findAuthor().catch(function(reason){
20766
- return findOtherAuther();
20772
+ return findOtherAuthor();
20767
20773
  }).finally(function(){
20768
20774
  // author was either found, or not
20769
20775
  });
@@ -6,7 +6,7 @@
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 2.11.2
9
+ * @version 2.11.3
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -174,7 +174,7 @@ function defaults(obj, defaults) {
174
174
  return obj;
175
175
  }
176
176
 
177
- babelHelpers = {
177
+ var babelHelpers = {
178
178
  classCallCheck: classCallCheck,
179
179
  inherits: inherits,
180
180
  taggedTemplateLiteralLoose: taggedTemplateLiteralLoose,
@@ -3954,6 +3954,7 @@ enifed('ember-metal/error_handler', ['exports', 'ember-console', 'ember-metal/te
3954
3954
  exports.getOnerror = getOnerror;
3955
3955
  exports.setOnerror = setOnerror;
3956
3956
  exports.dispatchError = dispatchError;
3957
+ exports.getDispatchOverride = getDispatchOverride;
3957
3958
  exports.setDispatchOverride = setDispatchOverride;
3958
3959
 
3959
3960
  // To maintain stacktrace consistency across browsers
@@ -3994,6 +3995,10 @@ enifed('ember-metal/error_handler', ['exports', 'ember-console', 'ember-metal/te
3994
3995
 
3995
3996
  // allows testing adapter to override dispatch
3996
3997
 
3998
+ function getDispatchOverride() {
3999
+ return dispatchOverride;
4000
+ }
4001
+
3997
4002
  function setDispatchOverride(handler) {
3998
4003
  dispatchOverride = handler;
3999
4004
  }
@@ -8564,7 +8569,7 @@ enifed('ember-metal/run_loop', ['exports', 'ember-utils', 'ember-metal/debug', '
8564
8569
 
8565
8570
  var onErrorTarget = {
8566
8571
  get onerror() {
8567
- return _emberMetalError_handler.getOnerror();
8572
+ return _emberMetalError_handler.dispatchError;
8568
8573
  },
8569
8574
  set onerror(handler) {
8570
8575
  return _emberMetalError_handler.setOnerror(handler);
@@ -11844,8 +11849,7 @@ enifed('ember-utils/owner', ['exports', 'ember-utils/symbol'], function (exports
11844
11849
  For example, this component dynamically looks up a service based on the
11845
11850
  `audioType` passed as an attribute:
11846
11851
 
11847
- ```
11848
- // app/components/play-audio.js
11852
+ ```app/components/play-audio.js
11849
11853
  import Ember from 'ember';
11850
11854
 
11851
11855
  // Usage:
@@ -12024,7 +12028,7 @@ enifed("ember/features", ["exports"], function (exports) {
12024
12028
  enifed("ember/version", ["exports"], function (exports) {
12025
12029
  "use strict";
12026
12030
 
12027
- exports.default = "2.11.2";
12031
+ exports.default = "2.11.3";
12028
12032
  });
12029
12033
  enifed("glimmer-compiler/index", ["exports", "glimmer-compiler/lib/compiler", "glimmer-compiler/lib/template-visitor"], function (exports, _glimmerCompilerLibCompiler, _glimmerCompilerLibTemplateVisitor) {
12030
12034
  "use strict";
@@ -6,7 +6,7 @@
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 2.11.2
9
+ * @version 2.11.3
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -174,7 +174,7 @@ function defaults(obj, defaults) {
174
174
  return obj;
175
175
  }
176
176
 
177
- babelHelpers = {
177
+ var babelHelpers = {
178
178
  classCallCheck: classCallCheck,
179
179
  inherits: inherits,
180
180
  taggedTemplateLiteralLoose: taggedTemplateLiteralLoose,
@@ -6,7 +6,7 @@
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 2.11.2
9
+ * @version 2.11.3
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -174,7 +174,7 @@ function defaults(obj, defaults) {
174
174
  return obj;
175
175
  }
176
176
 
177
- babelHelpers = {
177
+ var babelHelpers = {
178
178
  classCallCheck: classCallCheck,
179
179
  inherits: inherits,
180
180
  taggedTemplateLiteralLoose: taggedTemplateLiteralLoose,
@@ -15475,6 +15475,41 @@ babelHelpers.classCallCheck(this, _class);
15475
15475
  return _class;
15476
15476
  })(_emberGlimmerTestsUtilsTestCase.RenderingTest));
15477
15477
  });
15478
+ enifed('ember-glimmer/tests/integration/components/destroy-test', ['exports', 'ember-metal', 'ember-glimmer/tests/utils/helpers', 'ember-glimmer/tests/utils/test-case'], function (exports, _emberMetal, _emberGlimmerTestsUtilsHelpers, _emberGlimmerTestsUtilsTestCase) {
15479
+ 'use strict';
15480
+
15481
+ _emberGlimmerTestsUtilsTestCase.moduleFor('Component destroy', (function (_RenderingTest) {
15482
+ babelHelpers.inherits(_class, _RenderingTest);
15483
+
15484
+ function _class() {
15485
+ babelHelpers.classCallCheck(this, _class);
15486
+
15487
+ _RenderingTest.apply(this, arguments);
15488
+ }
15489
+
15490
+ _class.prototype['@test it correctly releases the destroyed components'] = function testItCorrectlyReleasesTheDestroyedComponents(assert) {
15491
+ var _this = this;
15492
+
15493
+ var FooBarComponent = _emberGlimmerTestsUtilsHelpers.Component.extend({});
15494
+
15495
+ this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
15496
+
15497
+ this.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', { switch: true });
15498
+
15499
+ this.assertComponentElement(this.firstChild, { content: 'hello' });
15500
+
15501
+ this.runTask(function () {
15502
+ return _emberMetal.set(_this.context, 'switch', false);
15503
+ });
15504
+
15505
+ this.assertText('');
15506
+
15507
+ assert.equal(this.env.destroyedComponents.length, 0, 'enviroment.destroyedComponents should be empty');
15508
+ };
15509
+
15510
+ return _class;
15511
+ })(_emberGlimmerTestsUtilsTestCase.RenderingTest));
15512
+ });
15478
15513
  enifed('ember-glimmer/tests/integration/components/dynamic-components-test', ['exports', 'ember-metal', 'ember-glimmer/tests/utils/helpers', 'ember-glimmer/tests/utils/abstract-test-case', 'ember-glimmer/tests/utils/test-case'], function (exports, _emberMetal, _emberGlimmerTestsUtilsHelpers, _emberGlimmerTestsUtilsAbstractTestCase, _emberGlimmerTestsUtilsTestCase) {
15479
15514
  'use strict';
15480
15515
 
@@ -21154,8 +21189,8 @@ enifed('ember-glimmer/tests/integration/content-test', ['exports', 'ember-glimme
21154
21189
  _emberMetal.setDebugFunction('warn', originalWarn);
21155
21190
  };
21156
21191
 
21157
- StyleTest.prototype.assertStyleWarning = function assertStyleWarning() {
21158
- this.assert.deepEqual(warnings, [_emberViews.STYLE_WARNING]);
21192
+ StyleTest.prototype.assertStyleWarning = function assertStyleWarning(style) {
21193
+ this.assert.deepEqual(warnings, [_emberViews.constructStyleDeprecationMessage(style)]);
21159
21194
  };
21160
21195
 
21161
21196
  StyleTest.prototype.assertNoWarning = function assertNoWarning() {
@@ -21254,11 +21289,12 @@ enifed('ember-glimmer/tests/integration/content-test', ['exports', 'ember-glimme
21254
21289
  }
21255
21290
 
21256
21291
  _class9.prototype['@test specifying <div style={{userValue}}></div> generates a warning'] = function testSpecifyingDivStyleUserValueDivGeneratesAWarning(assert) {
21292
+ var userValue = 'width: 42px';
21257
21293
  this.render('<div style={{userValue}}></div>', {
21258
- userValue: 'width: 42px'
21294
+ userValue: userValue
21259
21295
  });
21260
21296
 
21261
- this.assertStyleWarning();
21297
+ this.assertStyleWarning(userValue);
21262
21298
  };
21263
21299
 
21264
21300
  _class9.prototype['@test specifying `attributeBindings: ["style"]` generates a warning'] = function testSpecifyingAttributeBindingsStyleGeneratesAWarning(assert) {
@@ -21267,12 +21303,12 @@ enifed('ember-glimmer/tests/integration/content-test', ['exports', 'ember-glimme
21267
21303
  });
21268
21304
 
21269
21305
  this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
21270
-
21306
+ var userValue = 'width: 42px';
21271
21307
  this.render('{{foo-bar style=userValue}}', {
21272
- userValue: 'width: 42px'
21308
+ userValue: userValue
21273
21309
  });
21274
21310
 
21275
- this.assertStyleWarning();
21311
+ this.assertStyleWarning(userValue);
21276
21312
  };
21277
21313
 
21278
21314
  _class9.prototype['@test specifying `<div style={{{userValue}}}></div>` works properly without a warning'] = function testSpecifyingDivStyleUserValueDivWorksProperlyWithoutAWarning(assert) {
@@ -21322,35 +21358,39 @@ enifed('ember-glimmer/tests/integration/content-test', ['exports', 'ember-glimme
21322
21358
  };
21323
21359
 
21324
21360
  _class9.prototype['@test binding warning is triggered when an unsafe string is quoted'] = function testBindingWarningIsTriggeredWhenAnUnsafeStringIsQuoted(assert) {
21361
+ var userValue = 'width: 42px';
21325
21362
  this.render('<div style="{{userValue}}"></div>', {
21326
- userValue: 'width: 42px'
21363
+ userValue: userValue
21327
21364
  });
21328
21365
 
21329
- this.assertStyleWarning();
21366
+ this.assertStyleWarning(userValue);
21330
21367
  };
21331
21368
 
21332
21369
  _class9.prototype['@test binding warning is triggered when a safe string for a complete property is concatenated in place'] = function testBindingWarningIsTriggeredWhenASafeStringForACompletePropertyIsConcatenatedInPlace(assert) {
21370
+ var userValue = 'width: 42px';
21333
21371
  this.render('<div style="color: green; {{userValue}}"></div>', {
21334
21372
  userValue: new _emberGlimmerTestsUtilsHelpers.SafeString('width: 42px')
21335
21373
  });
21336
21374
 
21337
- this.assertStyleWarning();
21375
+ this.assertStyleWarning('color: green; ' + userValue);
21338
21376
  };
21339
21377
 
21340
21378
  _class9.prototype['@test binding warning is triggered when a safe string for a value is concatenated in place'] = function testBindingWarningIsTriggeredWhenASafeStringForAValueIsConcatenatedInPlace(assert) {
21379
+ var userValue = '42px';
21341
21380
  this.render('<div style="color: green; width: {{userValue}}"></div>', {
21342
- userValue: new _emberGlimmerTestsUtilsHelpers.SafeString('42px')
21381
+ userValue: new _emberGlimmerTestsUtilsHelpers.SafeString(userValue)
21343
21382
  });
21344
21383
 
21345
- this.assertStyleWarning();
21384
+ this.assertStyleWarning('color: green; width: ' + userValue);
21346
21385
  };
21347
21386
 
21348
21387
  _class9.prototype['@test binding warning is triggered when a safe string for a property name is concatenated in place'] = function testBindingWarningIsTriggeredWhenASafeStringForAPropertyNameIsConcatenatedInPlace(assert) {
21388
+ var userValue = 'width';
21349
21389
  this.render('<div style="color: green; {{userProperty}}: 42px"></div>', {
21350
- userProperty: new _emberGlimmerTestsUtilsHelpers.SafeString('width')
21390
+ userProperty: new _emberGlimmerTestsUtilsHelpers.SafeString(userValue)
21351
21391
  });
21352
21392
 
21353
- this.assertStyleWarning();
21393
+ this.assertStyleWarning('color: green; ' + userValue + ': 42px');
21354
21394
  };
21355
21395
 
21356
21396
  return _class9;
@@ -43096,7 +43136,7 @@ enifed('ember-metal/tests/run_loop/once_test', ['exports', 'ember-metal/run_loop
43096
43136
  });
43097
43137
  });
43098
43138
  });
43099
- enifed('ember-metal/tests/run_loop/onerror_test', ['exports', 'ember-metal/run_loop', 'ember-metal/error_handler'], function (exports, _emberMetalRun_loop, _emberMetalError_handler) {
43139
+ enifed('ember-metal/tests/run_loop/onerror_test', ['exports', 'ember-metal/run_loop', 'ember-metal/error_handler', 'ember-metal/testing'], function (exports, _emberMetalRun_loop, _emberMetalError_handler, _emberMetalTesting) {
43100
43140
  'use strict';
43101
43141
 
43102
43142
  QUnit.module('system/run_loop/onerror_test');
@@ -43123,17 +43163,24 @@ enifed('ember-metal/tests/run_loop/onerror_test', ['exports', 'ember-metal/run_l
43123
43163
  QUnit.test('With Ember.onerror set, errors in Ember.run are caught', function () {
43124
43164
  var thrown = new Error('Boom!');
43125
43165
  var original = _emberMetalError_handler.getOnerror();
43166
+ var originalDispatchOverride = _emberMetalError_handler.getDispatchOverride();
43167
+ var originalIsTesting = _emberMetalTesting.isTesting();
43126
43168
 
43127
43169
  var caught = undefined;
43128
43170
  _emberMetalError_handler.setOnerror(function (error) {
43129
43171
  caught = error;
43130
43172
  });
43173
+ _emberMetalError_handler.setDispatchOverride(null);
43174
+ _emberMetalTesting.setTesting(false);
43175
+
43131
43176
  try {
43132
43177
  _emberMetalRun_loop.default(function () {
43133
43178
  throw thrown;
43134
43179
  });
43135
43180
  } finally {
43136
43181
  _emberMetalError_handler.setOnerror(original);
43182
+ _emberMetalError_handler.setDispatchOverride(originalDispatchOverride);
43183
+ _emberMetalTesting.setTesting(originalIsTesting);
43137
43184
  }
43138
43185
 
43139
43186
  deepEqual(caught, thrown);
@@ -60139,9 +60186,11 @@ enifed('ember-testing/tests/adapters_test', ['exports', 'ember-metal', 'ember-te
60139
60186
  originalQUnit = window.QUnit;
60140
60187
  },
60141
60188
  teardown: function () {
60142
- _emberMetal.run(App, App.destroy);
60143
- App.removeTestHelpers();
60144
- App = null;
60189
+ if (App) {
60190
+ _emberMetal.run(App, App.destroy);
60191
+ App.removeTestHelpers();
60192
+ App = null;
60193
+ }
60145
60194
 
60146
60195
  _emberTestingTest.default.adapter = originalAdapter;
60147
60196
  window.QUnit = originalQUnit;
@@ -60195,6 +60244,23 @@ enifed('ember-testing/tests/adapters_test', ['exports', 'ember-metal', 'ember-te
60195
60244
  ok(_emberTestingTest.default.adapter instanceof _emberTestingAdaptersAdapter.default);
60196
60245
  ok(!(_emberTestingTest.default.adapter instanceof _emberTestingAdaptersQunit.default));
60197
60246
  });
60247
+
60248
+ QUnit.test('With Ember.Test.adapter set, errors in Ember.run are caught', function () {
60249
+ var thrown = new Error('Boom!');
60250
+
60251
+ var caught = undefined;
60252
+ _emberTestingTest.default.adapter = _emberTestingAdaptersQunit.default.create({
60253
+ exception: function (error) {
60254
+ caught = error;
60255
+ }
60256
+ });
60257
+
60258
+ _emberMetal.run(function () {
60259
+ throw thrown;
60260
+ });
60261
+
60262
+ deepEqual(caught, thrown);
60263
+ });
60198
60264
  });
60199
60265
  enifed('ember-testing/tests/ext/rsvp_test', ['exports', 'ember-testing/ext/rsvp', 'ember-testing/test/adapter', 'ember-metal'], function (exports, _emberTestingExtRsvp, _emberTestingTestAdapter, _emberMetal) {
60200
60266
  'use strict';
@@ -6,7 +6,7 @@
6
6
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
7
7
  * @license Licensed under MIT license
8
8
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
9
- * @version 2.11.2
9
+ * @version 2.11.3
10
10
  */
11
11
 
12
12
  var enifed, requireModule, Ember;
@@ -164,7 +164,7 @@ function defaults(obj, defaults) {
164
164
  return obj;
165
165
  }
166
166
 
167
- babelHelpers = {
167
+ var babelHelpers = {
168
168
  inherits: inherits,
169
169
  taggedTemplateLiteralLoose: taggedTemplateLiteralLoose,
170
170
  slice: Array.prototype.slice,
@@ -15353,6 +15353,39 @@ babelHelpers.inherits(_class, _RenderingTest);
15353
15353
  return _class;
15354
15354
  })(_emberGlimmerTestsUtilsTestCase.RenderingTest));
15355
15355
  });
15356
+ enifed('ember-glimmer/tests/integration/components/destroy-test', ['exports', 'ember-metal', 'ember-glimmer/tests/utils/helpers', 'ember-glimmer/tests/utils/test-case'], function (exports, _emberMetal, _emberGlimmerTestsUtilsHelpers, _emberGlimmerTestsUtilsTestCase) {
15357
+ 'use strict';
15358
+
15359
+ _emberGlimmerTestsUtilsTestCase.moduleFor('Component destroy', (function (_RenderingTest) {
15360
+ babelHelpers.inherits(_class, _RenderingTest);
15361
+
15362
+ function _class() {
15363
+ _RenderingTest.apply(this, arguments);
15364
+ }
15365
+
15366
+ _class.prototype['@test it correctly releases the destroyed components'] = function testItCorrectlyReleasesTheDestroyedComponents(assert) {
15367
+ var _this = this;
15368
+
15369
+ var FooBarComponent = _emberGlimmerTestsUtilsHelpers.Component.extend({});
15370
+
15371
+ this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
15372
+
15373
+ this.render('{{#if switch}}{{#foo-bar}}{{foo-bar}}{{/foo-bar}}{{/if}}', { switch: true });
15374
+
15375
+ this.assertComponentElement(this.firstChild, { content: 'hello' });
15376
+
15377
+ this.runTask(function () {
15378
+ return _emberMetal.set(_this.context, 'switch', false);
15379
+ });
15380
+
15381
+ this.assertText('');
15382
+
15383
+ assert.equal(this.env.destroyedComponents.length, 0, 'enviroment.destroyedComponents should be empty');
15384
+ };
15385
+
15386
+ return _class;
15387
+ })(_emberGlimmerTestsUtilsTestCase.RenderingTest));
15388
+ });
15356
15389
  enifed('ember-glimmer/tests/integration/components/dynamic-components-test', ['exports', 'ember-metal', 'ember-glimmer/tests/utils/helpers', 'ember-glimmer/tests/utils/abstract-test-case', 'ember-glimmer/tests/utils/test-case'], function (exports, _emberMetal, _emberGlimmerTestsUtilsHelpers, _emberGlimmerTestsUtilsAbstractTestCase, _emberGlimmerTestsUtilsTestCase) {
15357
15390
  'use strict';
15358
15391
 
@@ -20969,8 +21002,8 @@ enifed('ember-glimmer/tests/integration/content-test', ['exports', 'ember-glimme
20969
21002
  _emberMetal.setDebugFunction('warn', originalWarn);
20970
21003
  };
20971
21004
 
20972
- StyleTest.prototype.assertStyleWarning = function assertStyleWarning() {
20973
- this.assert.deepEqual(warnings, [_emberViews.STYLE_WARNING]);
21005
+ StyleTest.prototype.assertStyleWarning = function assertStyleWarning(style) {
21006
+ this.assert.deepEqual(warnings, [_emberViews.constructStyleDeprecationMessage(style)]);
20974
21007
  };
20975
21008
 
20976
21009
  StyleTest.prototype.assertNoWarning = function assertNoWarning() {
@@ -21065,11 +21098,12 @@ enifed('ember-glimmer/tests/integration/content-test', ['exports', 'ember-glimme
21065
21098
  }
21066
21099
 
21067
21100
  _class9.prototype['@test specifying <div style={{userValue}}></div> generates a warning'] = function testSpecifyingDivStyleUserValueDivGeneratesAWarning(assert) {
21101
+ var userValue = 'width: 42px';
21068
21102
  this.render('<div style={{userValue}}></div>', {
21069
- userValue: 'width: 42px'
21103
+ userValue: userValue
21070
21104
  });
21071
21105
 
21072
- this.assertStyleWarning();
21106
+ this.assertStyleWarning(userValue);
21073
21107
  };
21074
21108
 
21075
21109
  _class9.prototype['@test specifying `attributeBindings: ["style"]` generates a warning'] = function testSpecifyingAttributeBindingsStyleGeneratesAWarning(assert) {
@@ -21078,12 +21112,12 @@ enifed('ember-glimmer/tests/integration/content-test', ['exports', 'ember-glimme
21078
21112
  });
21079
21113
 
21080
21114
  this.registerComponent('foo-bar', { ComponentClass: FooBarComponent, template: 'hello' });
21081
-
21115
+ var userValue = 'width: 42px';
21082
21116
  this.render('{{foo-bar style=userValue}}', {
21083
- userValue: 'width: 42px'
21117
+ userValue: userValue
21084
21118
  });
21085
21119
 
21086
- this.assertStyleWarning();
21120
+ this.assertStyleWarning(userValue);
21087
21121
  };
21088
21122
 
21089
21123
  _class9.prototype['@test specifying `<div style={{{userValue}}}></div>` works properly without a warning'] = function testSpecifyingDivStyleUserValueDivWorksProperlyWithoutAWarning(assert) {
@@ -21133,35 +21167,39 @@ enifed('ember-glimmer/tests/integration/content-test', ['exports', 'ember-glimme
21133
21167
  };
21134
21168
 
21135
21169
  _class9.prototype['@test binding warning is triggered when an unsafe string is quoted'] = function testBindingWarningIsTriggeredWhenAnUnsafeStringIsQuoted(assert) {
21170
+ var userValue = 'width: 42px';
21136
21171
  this.render('<div style="{{userValue}}"></div>', {
21137
- userValue: 'width: 42px'
21172
+ userValue: userValue
21138
21173
  });
21139
21174
 
21140
- this.assertStyleWarning();
21175
+ this.assertStyleWarning(userValue);
21141
21176
  };
21142
21177
 
21143
21178
  _class9.prototype['@test binding warning is triggered when a safe string for a complete property is concatenated in place'] = function testBindingWarningIsTriggeredWhenASafeStringForACompletePropertyIsConcatenatedInPlace(assert) {
21179
+ var userValue = 'width: 42px';
21144
21180
  this.render('<div style="color: green; {{userValue}}"></div>', {
21145
21181
  userValue: new _emberGlimmerTestsUtilsHelpers.SafeString('width: 42px')
21146
21182
  });
21147
21183
 
21148
- this.assertStyleWarning();
21184
+ this.assertStyleWarning('color: green; ' + userValue);
21149
21185
  };
21150
21186
 
21151
21187
  _class9.prototype['@test binding warning is triggered when a safe string for a value is concatenated in place'] = function testBindingWarningIsTriggeredWhenASafeStringForAValueIsConcatenatedInPlace(assert) {
21188
+ var userValue = '42px';
21152
21189
  this.render('<div style="color: green; width: {{userValue}}"></div>', {
21153
- userValue: new _emberGlimmerTestsUtilsHelpers.SafeString('42px')
21190
+ userValue: new _emberGlimmerTestsUtilsHelpers.SafeString(userValue)
21154
21191
  });
21155
21192
 
21156
- this.assertStyleWarning();
21193
+ this.assertStyleWarning('color: green; width: ' + userValue);
21157
21194
  };
21158
21195
 
21159
21196
  _class9.prototype['@test binding warning is triggered when a safe string for a property name is concatenated in place'] = function testBindingWarningIsTriggeredWhenASafeStringForAPropertyNameIsConcatenatedInPlace(assert) {
21197
+ var userValue = 'width';
21160
21198
  this.render('<div style="color: green; {{userProperty}}: 42px"></div>', {
21161
- userProperty: new _emberGlimmerTestsUtilsHelpers.SafeString('width')
21199
+ userProperty: new _emberGlimmerTestsUtilsHelpers.SafeString(userValue)
21162
21200
  });
21163
21201
 
21164
- this.assertStyleWarning();
21202
+ this.assertStyleWarning('color: green; ' + userValue + ': 42px');
21165
21203
  };
21166
21204
 
21167
21205
  return _class9;
@@ -42651,7 +42689,7 @@ enifed('ember-metal/tests/run_loop/once_test', ['exports', 'ember-metal/run_loop
42651
42689
  });
42652
42690
  });
42653
42691
  });
42654
- enifed('ember-metal/tests/run_loop/onerror_test', ['exports', 'ember-metal/run_loop', 'ember-metal/error_handler'], function (exports, _emberMetalRun_loop, _emberMetalError_handler) {
42692
+ enifed('ember-metal/tests/run_loop/onerror_test', ['exports', 'ember-metal/run_loop', 'ember-metal/error_handler', 'ember-metal/testing'], function (exports, _emberMetalRun_loop, _emberMetalError_handler, _emberMetalTesting) {
42655
42693
  'use strict';
42656
42694
 
42657
42695
  QUnit.module('system/run_loop/onerror_test');
@@ -42678,17 +42716,24 @@ enifed('ember-metal/tests/run_loop/onerror_test', ['exports', 'ember-metal/run_l
42678
42716
  QUnit.test('With Ember.onerror set, errors in Ember.run are caught', function () {
42679
42717
  var thrown = new Error('Boom!');
42680
42718
  var original = _emberMetalError_handler.getOnerror();
42719
+ var originalDispatchOverride = _emberMetalError_handler.getDispatchOverride();
42720
+ var originalIsTesting = _emberMetalTesting.isTesting();
42681
42721
 
42682
42722
  var caught = undefined;
42683
42723
  _emberMetalError_handler.setOnerror(function (error) {
42684
42724
  caught = error;
42685
42725
  });
42726
+ _emberMetalError_handler.setDispatchOverride(null);
42727
+ _emberMetalTesting.setTesting(false);
42728
+
42686
42729
  try {
42687
42730
  _emberMetalRun_loop.default(function () {
42688
42731
  throw thrown;
42689
42732
  });
42690
42733
  } finally {
42691
42734
  _emberMetalError_handler.setOnerror(original);
42735
+ _emberMetalError_handler.setDispatchOverride(originalDispatchOverride);
42736
+ _emberMetalTesting.setTesting(originalIsTesting);
42692
42737
  }
42693
42738
 
42694
42739
  deepEqual(caught, thrown);
@@ -59680,9 +59725,11 @@ enifed('ember-testing/tests/adapters_test', ['exports', 'ember-metal', 'ember-te
59680
59725
  originalQUnit = window.QUnit;
59681
59726
  },
59682
59727
  teardown: function () {
59683
- _emberMetal.run(App, App.destroy);
59684
- App.removeTestHelpers();
59685
- App = null;
59728
+ if (App) {
59729
+ _emberMetal.run(App, App.destroy);
59730
+ App.removeTestHelpers();
59731
+ App = null;
59732
+ }
59686
59733
 
59687
59734
  _emberTestingTest.default.adapter = originalAdapter;
59688
59735
  window.QUnit = originalQUnit;
@@ -59736,6 +59783,23 @@ enifed('ember-testing/tests/adapters_test', ['exports', 'ember-metal', 'ember-te
59736
59783
  ok(_emberTestingTest.default.adapter instanceof _emberTestingAdaptersAdapter.default);
59737
59784
  ok(!(_emberTestingTest.default.adapter instanceof _emberTestingAdaptersQunit.default));
59738
59785
  });
59786
+
59787
+ QUnit.test('With Ember.Test.adapter set, errors in Ember.run are caught', function () {
59788
+ var thrown = new Error('Boom!');
59789
+
59790
+ var caught = undefined;
59791
+ _emberTestingTest.default.adapter = _emberTestingAdaptersQunit.default.create({
59792
+ exception: function (error) {
59793
+ caught = error;
59794
+ }
59795
+ });
59796
+
59797
+ _emberMetal.run(function () {
59798
+ throw thrown;
59799
+ });
59800
+
59801
+ deepEqual(caught, thrown);
59802
+ });
59739
59803
  });
59740
59804
  enifed('ember-testing/tests/ext/rsvp_test', ['exports', 'ember-testing/ext/rsvp', 'ember-testing/test/adapter', 'ember-metal'], function (exports, _emberTestingExtRsvp, _emberTestingTestAdapter, _emberMetal) {
59741
59805
  'use strict';