ember-source 1.11.0.beta.5 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ember-source might be problematic. Click here for more details.

@@ -5,7 +5,7 @@
5
5
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
6
  * @license Licensed under MIT license
7
7
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- * @version 1.11.0-beta.5.1501308c
8
+ * @version 1.11.0
9
9
  */
10
10
 
11
11
  (function() {
@@ -428,13 +428,12 @@ enifed('ember-testing/adapters/qunit', ['exports', 'ember-testing/adapters/adapt
428
428
  });
429
429
 
430
430
  });
431
- enifed('ember-testing/helpers', ['ember-metal/core', 'ember-metal/property_get', 'ember-metal/error', 'ember-metal/run_loop', 'ember-views/system/jquery', 'ember-testing/test'], function (Ember, property_get, EmberError, run, jQuery, Test) {
431
+ enifed('ember-testing/helpers', ['ember-metal/core', 'ember-metal/property_get', 'ember-metal/error', 'ember-metal/run_loop', 'ember-views/system/jquery', 'ember-testing/test', 'ember-runtime/ext/rsvp'], function (Ember, property_get, EmberError, run, jQuery, Test, RSVP) {
432
432
 
433
433
  'use strict';
434
434
 
435
435
  var helper = Test['default'].registerHelper;
436
436
  var asyncHelper = Test['default'].registerAsyncHelper;
437
- var countAsync = 0;
438
437
 
439
438
  function currentRouteName(app) {
440
439
  var appController = app.__container__.lookup('controller:application');
@@ -621,12 +620,7 @@ enifed('ember-testing/helpers', ['ember-metal/core', 'ember-metal/property_get',
621
620
  }
622
621
 
623
622
  function wait(app, value) {
624
- return Test['default'].promise(function(resolve) {
625
- // If this is the first async promise, kick off the async test
626
- if (++countAsync === 1) {
627
- Test['default'].adapter.asyncStart();
628
- }
629
-
623
+ return new RSVP['default'].Promise(function(resolve) {
630
624
  // Every 10ms, poll for the async thing to have finished
631
625
  var watcher = setInterval(function() {
632
626
  var router = app.__container__.lookup('router:main');
@@ -650,11 +644,6 @@ enifed('ember-testing/helpers', ['ember-metal/core', 'ember-metal/property_get',
650
644
  // Stop polling
651
645
  clearInterval(watcher);
652
646
 
653
- // If this is the last async promise, end the async test
654
- if (--countAsync === 0) {
655
- Test['default'].adapter.asyncEnd();
656
- }
657
-
658
647
  // Synchronously resolve the promise
659
648
  run['default'](null, resolve, value);
660
649
  }, 10);
@@ -1306,7 +1295,7 @@ enifed('ember-testing/test', ['exports', 'ember-metal/core', 'ember-metal/run_lo
1306
1295
 
1307
1296
  return function() {
1308
1297
  var args = slice.call(arguments);
1309
- var lastPromise = Test.lastPromise;
1298
+ var lastPromise;
1310
1299
 
1311
1300
  args.unshift(app);
1312
1301
 
@@ -1317,35 +1306,28 @@ enifed('ember-testing/test', ['exports', 'ember-metal/core', 'ember-metal/run_lo
1317
1306
  return fn.apply(app, args);
1318
1307
  }
1319
1308
 
1320
- if (!lastPromise) {
1321
- // It's the first async helper in current context
1322
- lastPromise = fn.apply(app, args);
1323
- } else {
1324
- // wait for last helper's promise to resolve and then
1325
- // execute. To be safe, we need to tell the adapter we're going
1326
- // asynchronous here, because fn may not be invoked before we
1327
- // return.
1328
- Test.adapter.asyncStart();
1329
- run(function() {
1330
- lastPromise = Test.resolve(lastPromise).then(function() {
1331
- try {
1332
- return fn.apply(app, args);
1333
- } finally {
1334
- Test.adapter.asyncEnd();
1335
- }
1336
- });
1337
- });
1338
- }
1309
+ lastPromise = run(function() {
1310
+ return Test.resolve(Test.lastPromise);
1311
+ });
1339
1312
 
1340
- return lastPromise;
1313
+ // wait for last helper's promise to resolve and then
1314
+ // execute. To be safe, we need to tell the adapter we're going
1315
+ // asynchronous here, because fn may not be invoked before we
1316
+ // return.
1317
+ Test.adapter.asyncStart();
1318
+ return lastPromise.then(function() {
1319
+ return fn.apply(app, args);
1320
+ })["finally"](function() {
1321
+ Test.adapter.asyncEnd();
1322
+ });
1341
1323
  };
1342
1324
  }
1343
1325
 
1344
1326
  function run(fn) {
1345
1327
  if (!emberRun['default'].currentRunLoop) {
1346
- emberRun['default'](fn);
1328
+ return emberRun['default'](fn);
1347
1329
  } else {
1348
- fn();
1330
+ return fn();
1349
1331
  }
1350
1332
  }
1351
1333
 
@@ -1509,6 +1491,7 @@ enifed('ember-testing/test', ['exports', 'ember-metal/core', 'ember-metal/run_lo
1509
1491
 
1510
1492
  Test.Promise.prototype = create['default'](RSVP['default'].Promise.prototype);
1511
1493
  Test.Promise.prototype.constructor = Test.Promise;
1494
+ Test.Promise.resolve = Test.resolve;
1512
1495
 
1513
1496
  // Patch `then` to isolate async methods
1514
1497
  // specifically `Ember.Test.lastPromise`
@@ -1525,7 +1508,6 @@ enifed('ember-testing/test', ['exports', 'ember-metal/core', 'ember-metal/run_lo
1525
1508
  // 1. Set `Ember.Test.lastPromise` to null
1526
1509
  // 2. Invoke method
1527
1510
  // 3. Return the last promise created during method
1528
- // 4. Restore `Ember.Test.lastPromise` to original value
1529
1511
  function isolate(fn, val) {
1530
1512
  var value, lastPromise;
1531
1513
 
@@ -1535,6 +1517,7 @@ enifed('ember-testing/test', ['exports', 'ember-metal/core', 'ember-metal/run_lo
1535
1517
  value = fn(val);
1536
1518
 
1537
1519
  lastPromise = Test.lastPromise;
1520
+ Test.lastPromise = null;
1538
1521
 
1539
1522
  // If the method returned a promise
1540
1523
  // return that promise. If not,
@@ -1542,12 +1525,11 @@ enifed('ember-testing/test', ['exports', 'ember-metal/core', 'ember-metal/run_lo
1542
1525
  if ((value && (value instanceof Test.Promise)) || !lastPromise) {
1543
1526
  return value;
1544
1527
  } else {
1545
- run(function() {
1546
- lastPromise = Test.resolve(lastPromise).then(function() {
1528
+ return run(function() {
1529
+ return Test.resolve(lastPromise).then(function() {
1547
1530
  return value;
1548
1531
  });
1549
1532
  });
1550
- return lastPromise;
1551
1533
  }
1552
1534
  }
1553
1535
 
@@ -5,7 +5,7 @@
5
5
  * Portions Copyright 2008-2011 Apple Inc. All rights reserved.
6
6
  * @license Licensed under MIT license
7
7
  * See https://raw.github.com/emberjs/ember.js/master/LICENSE
8
- * @version 1.11.0-beta.5.1501308c
8
+ * @version 1.11.0
9
9
  */
10
10
 
11
11
  (function() {
@@ -3406,6 +3406,14 @@ enifed('ember-debug/tests/main_test', ['ember-metal/core'], function (Ember) {
3406
3406
 
3407
3407
  QUnit.module('ember-debug');
3408
3408
 
3409
+ QUnit.test('Ember.deprecate throws deprecation with one argument', function() {
3410
+ expect(1);
3411
+
3412
+ throws(function() {
3413
+ Ember['default'].deprecate('Deprecation is thrown');
3414
+ });
3415
+ });
3416
+
3409
3417
  QUnit.test('Ember.deprecate throws deprecation if second argument is falsy', function() {
3410
3418
  expect(3);
3411
3419
 
@@ -5390,8 +5398,8 @@ enifed('ember-htmlbars/tests/attr_nodes/boolean_test', ['ember-views/views/view'
5390
5398
  run['default'](function() { view.appendTo('#qunit-fixture'); });
5391
5399
  }
5392
5400
 
5393
-
5394
5401
  // jscs:disable validateIndentation
5402
+
5395
5403
 
5396
5404
  QUnit.module("ember-htmlbars: boolean attribute", {
5397
5405
  teardown: function() {
@@ -5475,9 +5483,8 @@ enifed('ember-htmlbars/tests/attr_nodes/boolean_test', ['ember-views/views/view'
5475
5483
  'boolean property is set false');
5476
5484
  });
5477
5485
 
5478
-
5479
- // jscs:enable validateIndentation
5480
5486
 
5487
+ // jscs:enable validateIndentation
5481
5488
 
5482
5489
  });
5483
5490
  enifed('ember-htmlbars/tests/attr_nodes/boolean_test.jscs-test', function () {
@@ -5515,8 +5522,8 @@ enifed('ember-htmlbars/tests/attr_nodes/class_test', ['ember-views/views/view',
5515
5522
  isInlineIfEnabled = true;
5516
5523
 
5517
5524
 
5518
-
5519
5525
  // jscs:disable validateIndentation
5526
+
5520
5527
 
5521
5528
  QUnit.module("ember-htmlbars: class attribute", {
5522
5529
  teardown: function() {
@@ -5652,8 +5659,8 @@ enifed('ember-htmlbars/tests/attr_nodes/class_test', ['ember-views/views/view',
5652
5659
  ok(view.element.firstChild.className, 'r b a c', 'classes are in the right order');
5653
5660
  });
5654
5661
 
5655
- // jscs:enable validateIndentation
5656
5662
 
5663
+ // jscs:enable validateIndentation
5657
5664
 
5658
5665
  });
5659
5666
  enifed('ember-htmlbars/tests/attr_nodes/class_test.jscs-test', function () {
@@ -5965,8 +5972,8 @@ enifed('ember-htmlbars/tests/attr_nodes/href_test', ['ember-views/views/view', '
5965
5972
  run['default'](function() { view.appendTo('#qunit-fixture'); });
5966
5973
  }
5967
5974
 
5968
-
5969
5975
  // jscs:disable validateIndentation
5976
+
5970
5977
 
5971
5978
  QUnit.module("ember-htmlbars: href attribute", {
5972
5979
  teardown: function() {
@@ -5987,8 +5994,8 @@ enifed('ember-htmlbars/tests/attr_nodes/href_test', ['ember-views/views/view', '
5987
5994
  "attribute is output");
5988
5995
  });
5989
5996
 
5990
- // jscs:enable validateIndentation
5991
5997
 
5998
+ // jscs:enable validateIndentation
5992
5999
 
5993
6000
  });
5994
6001
  enifed('ember-htmlbars/tests/attr_nodes/href_test.jscs-test', function () {
@@ -6028,8 +6035,8 @@ enifed('ember-htmlbars/tests/attr_nodes/property_test', ['ember-views/views/view
6028
6035
  return input.maxLength === 0;
6029
6036
  }
6030
6037
 
6031
-
6032
6038
  // jscs:disable validateIndentation
6039
+
6033
6040
 
6034
6041
  QUnit.module("ember-htmlbars: property", {
6035
6042
  teardown: function() {
@@ -6082,8 +6089,8 @@ enifed('ember-htmlbars/tests/attr_nodes/property_test', ['ember-views/views/view
6082
6089
  ok(true, "no legacy assertion prohibited setting an array");
6083
6090
  });
6084
6091
 
6085
- // jscs:enable validateIndentation
6086
6092
 
6093
+ // jscs:enable validateIndentation
6087
6094
 
6088
6095
  });
6089
6096
  enifed('ember-htmlbars/tests/attr_nodes/property_test.jscs-test', function () {
@@ -6120,26 +6127,41 @@ enifed('ember-htmlbars/tests/attr_nodes/sanitized_test', ['ember-views/views/vie
6120
6127
  }
6121
6128
  });
6122
6129
 
6123
-
6124
6130
  // jscs:disable validateIndentation
6131
+ // jscs:disable disallowTrailingWhitespace
6132
+
6125
6133
 
6126
6134
  var badTags = [
6127
6135
  { tag: 'a', attr: 'href',
6128
6136
  unquotedTemplate: compile['default']("<a href={{url}}></a>"),
6129
6137
  quotedTemplate: compile['default']("<a href='{{url}}'></a>"),
6130
6138
  multipartTemplate: compile['default']("<a href='{{protocol}}{{path}}'></a>") },
6139
+
6140
+ { tag: 'base', attr: 'href',
6141
+ unquotedTemplate: compile['default']("<base href={{url}} />"),
6142
+ quotedTemplate: compile['default']("<base href='{{url}}'/>"),
6143
+ multipartTemplate: compile['default']("<base href='{{protocol}}{{path}}'/>") },
6144
+
6145
+ { tag: 'embed', attr: 'src',
6146
+ unquotedTemplate: compile['default']("<embed src={{url}} />"),
6147
+ quotedTemplate: compile['default']("<embed src='{{url}}'/>"),
6148
+ multipartTemplate: compile['default']("<embed src='{{protocol}}{{path}}'/>") },
6149
+
6131
6150
  { tag: 'body', attr: 'background',
6132
6151
  unquotedTemplate: compile['default']("<body background={{url}}></body>"),
6133
6152
  quotedTemplate: compile['default']("<body background='{{url}}'></body>"),
6134
6153
  multipartTemplate: compile['default']("<body background='{{protocol}}{{path}}'></body>") },
6154
+
6135
6155
  { tag: 'link', attr: 'href',
6136
6156
  unquotedTemplate: compile['default']("<link href={{url}}>"),
6137
6157
  quotedTemplate: compile['default']("<link href='{{url}}'>"),
6138
6158
  multipartTemplate: compile['default']("<link href='{{protocol}}{{path}}'>") },
6159
+
6139
6160
  { tag: 'img', attr: 'src',
6140
6161
  unquotedTemplate: compile['default']("<img src={{url}}>"),
6141
6162
  quotedTemplate: compile['default']("<img src='{{url}}'>"),
6142
6163
  multipartTemplate: compile['default']("<img src='{{protocol}}{{path}}'>") },
6164
+
6143
6165
  { tag: 'iframe', attr: 'src',
6144
6166
  // Setting an iframe with a bad protocol results in the browser
6145
6167
  // being redirected. in IE8. Skip the iframe tests on that platform.
@@ -6214,8 +6236,9 @@ enifed('ember-htmlbars/tests/attr_nodes/sanitized_test', ['ember-views/views/vie
6214
6236
  })(); //jshint ignore:line
6215
6237
  }
6216
6238
 
6217
- // jscs:enable validateIndentation
6218
6239
 
6240
+ // jscs:enable disallowTrailingWhitespace
6241
+ // jscs:enable validateIndentation
6219
6242
 
6220
6243
  });
6221
6244
  enifed('ember-htmlbars/tests/attr_nodes/sanitized_test.jscs-test', function () {
@@ -6237,6 +6260,104 @@ enifed('ember-htmlbars/tests/attr_nodes/sanitized_test.jshint', function () {
6237
6260
  ok(true, 'ember-htmlbars/tests/attr_nodes/sanitized_test.js should pass jshint.');
6238
6261
  });
6239
6262
 
6263
+ });
6264
+ enifed('ember-htmlbars/tests/attr_nodes/style_test', ['ember-metal/core', 'ember-views/views/view', 'ember-template-compiler/system/compile', 'ember-htmlbars/utils/string', 'ember-runtime/tests/utils', 'ember-views/attr_nodes/attr_node'], function (Ember, EmberView, compile, string, utils, attr_node) {
6265
+
6266
+ 'use strict';
6267
+
6268
+ /* globals EmberDev */
6269
+
6270
+ var view, originalWarn, warnings;
6271
+
6272
+ QUnit.module("ember-htmlbars: style attribute", {
6273
+ setup: function() {
6274
+ warnings = [];
6275
+ originalWarn = Ember['default'].warn;
6276
+ Ember['default'].warn = function(message, test) {
6277
+ if (!test) {
6278
+ warnings.push(message);
6279
+ }
6280
+ };
6281
+ },
6282
+
6283
+ teardown: function() {
6284
+ utils.runDestroy(view);
6285
+ Ember['default'].warn = originalWarn;
6286
+ }
6287
+ });
6288
+
6289
+ // jscs:disable validateIndentation
6290
+
6291
+
6292
+ if (!EmberDev.runningProdBuild) {
6293
+ QUnit.test('specifying `<div style={{userValue}}></div>` generates a warning', function() {
6294
+ view = EmberView['default'].create({
6295
+ userValue: 'width: 42px',
6296
+ template: compile['default']('<div style={{view.userValue}}></div>')
6297
+ });
6298
+
6299
+ utils.runAppend(view);
6300
+
6301
+ deepEqual(warnings, [attr_node.styleWarning]);
6302
+ });
6303
+
6304
+ QUnit.test('specifying `attributeBindings: ["style"]` generates a warning', function() {
6305
+ view = EmberView['default'].create({
6306
+ userValue: 'width: 42px',
6307
+ template: compile['default']('<div style={{view.userValue}}></div>')
6308
+ });
6309
+
6310
+ utils.runAppend(view);
6311
+
6312
+ deepEqual(warnings, [attr_node.styleWarning]);
6313
+ });
6314
+ }
6315
+
6316
+ QUnit.test('specifying `<div style={{{userValue}}}></div>` works properly without a warning', function() {
6317
+ view = EmberView['default'].create({
6318
+ userValue: 'width: 42px',
6319
+ template: compile['default']('<div style={{{view.userValue}}}></div>')
6320
+ });
6321
+
6322
+ utils.runAppend(view);
6323
+
6324
+ deepEqual(warnings, [ ]);
6325
+ });
6326
+
6327
+ QUnit.test('specifying `<div style={{userValue}}></div>` works properly with a SafeString', function() {
6328
+ view = EmberView['default'].create({
6329
+ userValue: new string.SafeString('width: 42px'),
6330
+ template: compile['default']('<div style={{view.userValue}}></div>')
6331
+ });
6332
+
6333
+ utils.runAppend(view);
6334
+
6335
+ deepEqual(warnings, [ ]);
6336
+ });
6337
+
6338
+
6339
+ // jscs:enable validateIndentation
6340
+
6341
+ });
6342
+ enifed('ember-htmlbars/tests/attr_nodes/style_test.jscs-test', function () {
6343
+
6344
+ 'use strict';
6345
+
6346
+ module('JSCS - ember-htmlbars/tests/attr_nodes');
6347
+ test('ember-htmlbars/tests/attr_nodes/style_test.js should pass jscs', function() {
6348
+ ok(true, 'ember-htmlbars/tests/attr_nodes/style_test.js should pass jscs.');
6349
+ });
6350
+
6351
+ });
6352
+ enifed('ember-htmlbars/tests/attr_nodes/style_test.jshint', function () {
6353
+
6354
+ 'use strict';
6355
+
6356
+ module('JSHint - ember-htmlbars/tests/attr_nodes');
6357
+ test('ember-htmlbars/tests/attr_nodes/style_test.js should pass jshint', function() {
6358
+ ok(true, 'ember-htmlbars/tests/attr_nodes/style_test.js should pass jshint.');
6359
+ });
6360
+
6240
6361
  });
6241
6362
  enifed('ember-htmlbars/tests/attr_nodes/svg_test', ['ember-views/views/view', 'ember-metal/run_loop', 'ember-template-compiler/system/compile', 'htmlbars-test-helpers'], function (EmberView, run, compile, htmlbars_test_helpers) {
6242
6363
 
@@ -6248,8 +6369,8 @@ enifed('ember-htmlbars/tests/attr_nodes/svg_test', ['ember-views/views/view', 'e
6248
6369
  run['default'](function() { view.appendTo('#qunit-fixture'); });
6249
6370
  }
6250
6371
 
6251
-
6252
6372
  // jscs:disable validateIndentation
6373
+
6253
6374
 
6254
6375
  QUnit.module("ember-htmlbars: svg attribute", {
6255
6376
  teardown: function() {
@@ -6314,8 +6435,8 @@ enifed('ember-htmlbars/tests/attr_nodes/svg_test', ['ember-views/views/view', 'e
6314
6435
  htmlbars_test_helpers.equalInnerHTML(view.element, '<svg class="red tall"></svg>', "attribute is output");
6315
6436
  });
6316
6437
 
6317
- // jscs:enable validateIndentation
6318
6438
 
6439
+ // jscs:enable validateIndentation
6319
6440
 
6320
6441
  });
6321
6442
  enifed('ember-htmlbars/tests/attr_nodes/svg_test.jscs-test', function () {
@@ -6348,8 +6469,8 @@ enifed('ember-htmlbars/tests/attr_nodes/value_test', ['ember-views/views/view',
6348
6469
  run['default'](function() { view.appendTo('#qunit-fixture'); });
6349
6470
  }
6350
6471
 
6351
-
6352
6472
  // jscs:disable validateIndentation
6473
+
6353
6474
 
6354
6475
  QUnit.module("ember-htmlbars: value attribute", {
6355
6476
  teardown: function() {
@@ -6395,8 +6516,8 @@ enifed('ember-htmlbars/tests/attr_nodes/value_test', ['ember-views/views/view',
6395
6516
  'property is set true');
6396
6517
  });
6397
6518
 
6398
- // jscs:enable validateIndentation
6399
6519
 
6520
+ // jscs:enable validateIndentation
6400
6521
 
6401
6522
  });
6402
6523
  enifed('ember-htmlbars/tests/attr_nodes/value_test.jscs-test', function () {
@@ -7540,15 +7661,17 @@ enifed('ember-htmlbars/tests/compat/precompile_test.jshint', function () {
7540
7661
  });
7541
7662
 
7542
7663
  });
7543
- enifed('ember-htmlbars/tests/helpers/bind_attr_test', ['ember-metal/core', 'ember-metal/run_loop', 'ember-runtime/system/namespace', 'ember-views/views/view', 'ember-views/views/metamorph_view', 'ember-runtime/system/object', 'ember-runtime/system/native_array', 'ember-metal/computed', 'ember-metal/observer', 'ember-runtime/system/container', 'ember-metal/property_set', 'ember-runtime/tests/utils', 'ember-htmlbars/helpers', 'ember-template-compiler/system/compile'], function (Ember, run, Namespace, EmberView, _MetamorphView, EmberObject, native_array, computed, observer, system__container, property_set, utils, helpers, compile) {
7664
+ enifed('ember-htmlbars/tests/helpers/bind_attr_test', ['ember-metal/core', 'ember-metal/run_loop', 'ember-runtime/system/namespace', 'ember-views/views/view', 'ember-views/views/metamorph_view', 'ember-runtime/system/object', 'ember-runtime/system/native_array', 'ember-metal/computed', 'ember-metal/observer', 'ember-runtime/system/container', 'ember-metal/property_set', 'ember-runtime/tests/utils', 'ember-views/attr_nodes/attr_node', 'ember-htmlbars/utils/string', 'ember-htmlbars/helpers', 'ember-template-compiler/system/compile'], function (Ember, run, Namespace, EmberView, _MetamorphView, EmberObject, native_array, computed, observer, system__container, property_set, utils, attr_node, string, helpers, compile) {
7544
7665
 
7545
7666
  'use strict';
7546
7667
 
7668
+ /*globals EmberDev */
7547
7669
  /*jshint newcap:false*/
7670
+
7548
7671
  var view;
7549
7672
 
7550
7673
  var originalLookup = Ember['default'].lookup;
7551
- var TemplateTests, registry, container, lookup;
7674
+ var TemplateTests, registry, container, lookup, warnings, originalWarn;
7552
7675
 
7553
7676
  /**
7554
7677
  This module specifically tests integration with Handlebars and Ember-specific
@@ -7566,6 +7689,14 @@ enifed('ember-htmlbars/tests/helpers/bind_attr_test', ['ember-metal/core', 'embe
7566
7689
  registry.optionsForType('template', { instantiate: false });
7567
7690
  registry.register('view:default', _MetamorphView['default']);
7568
7691
  registry.register('view:toplevel', EmberView['default'].extend());
7692
+
7693
+ warnings = [];
7694
+ originalWarn = Ember['default'].warn;
7695
+ Ember['default'].warn = function(message, test) {
7696
+ if (!test) {
7697
+ warnings.push(message);
7698
+ }
7699
+ };
7569
7700
  },
7570
7701
 
7571
7702
  teardown: function() {
@@ -7574,6 +7705,7 @@ enifed('ember-htmlbars/tests/helpers/bind_attr_test', ['ember-metal/core', 'embe
7574
7705
  registry = container = view = null;
7575
7706
 
7576
7707
  Ember['default'].lookup = lookup = originalLookup;
7708
+ Ember['default'].warn = originalWarn;
7577
7709
  TemplateTests = null;
7578
7710
  }
7579
7711
  });
@@ -8105,7 +8237,7 @@ enifed('ember-htmlbars/tests/helpers/bind_attr_test', ['ember-metal/core', 'embe
8105
8237
  }, /You cannot set `data-bar` manually and via `{{bind-attr}}` helper on the same element/);
8106
8238
  });
8107
8239
 
8108
- QUnit.test("src attribute bound to undefined is not present", function() {
8240
+ QUnit.test("src attribute bound to undefined is empty", function() {
8109
8241
  var template = compile['default']("<img {{bind-attr src=view.undefinedValue}}>");
8110
8242
 
8111
8243
  view = EmberView['default'].create({
@@ -8115,10 +8247,10 @@ enifed('ember-htmlbars/tests/helpers/bind_attr_test', ['ember-metal/core', 'embe
8115
8247
 
8116
8248
  utils.runAppend(view);
8117
8249
 
8118
- ok(!view.element.hasAttribute('src'), "src attribute not present");
8250
+ equal(view.element.firstChild.getAttribute('src'), '', "src attribute is empty");
8119
8251
  });
8120
8252
 
8121
- QUnit.test("src attribute bound to null is not present", function() {
8253
+ QUnit.test("src attribute bound to null is empty", function() {
8122
8254
  var template = compile['default']("<img {{bind-attr src=view.nullValue}}>");
8123
8255
 
8124
8256
  view = EmberView['default'].create({
@@ -8128,7 +8260,69 @@ enifed('ember-htmlbars/tests/helpers/bind_attr_test', ['ember-metal/core', 'embe
8128
8260
 
8129
8261
  utils.runAppend(view);
8130
8262
 
8131
- ok(!view.element.hasAttribute('src'), "src attribute not present");
8263
+ equal(view.element.firstChild.getAttribute('src'), '', "src attribute is empty");
8264
+ });
8265
+
8266
+ QUnit.test("src attribute will be cleared when the value is set to null or undefined", function() {
8267
+ var template = compile['default']("<img {{bind-attr src=view.value}}>");
8268
+
8269
+ view = EmberView['default'].create({
8270
+ template: template,
8271
+ value: 'one'
8272
+ });
8273
+
8274
+ utils.runAppend(view);
8275
+
8276
+ equal(view.element.firstChild.getAttribute('src'), 'one', "src attribute is present");
8277
+
8278
+ run['default'](function() {
8279
+ property_set.set(view, 'value', 'two');
8280
+ });
8281
+
8282
+ equal(view.element.firstChild.getAttribute('src'), 'two', "src attribute is present");
8283
+
8284
+ run['default'](function() {
8285
+ property_set.set(view, 'value', null);
8286
+ });
8287
+
8288
+ equal(view.element.firstChild.getAttribute('src'), '', "src attribute is empty");
8289
+
8290
+ run['default'](function() {
8291
+ property_set.set(view, 'value', 'three');
8292
+ });
8293
+
8294
+ equal(view.element.firstChild.getAttribute('src'), 'three', "src attribute is present");
8295
+
8296
+ run['default'](function() {
8297
+ property_set.set(view, 'value', undefined);
8298
+ });
8299
+
8300
+ equal(view.element.firstChild.getAttribute('src'), '', "src attribute is empty");
8301
+ });
8302
+
8303
+ if (!EmberDev.runningProdBuild) {
8304
+
8305
+ QUnit.test('specifying `<div {{bind-attr style=userValue}}></div>` triggers a warning', function() {
8306
+ view = EmberView['default'].create({
8307
+ userValue: '42',
8308
+ template: compile['default']('<div {{bind-attr style=view.userValue}}></div>')
8309
+ });
8310
+
8311
+ utils.runAppend(view);
8312
+
8313
+ deepEqual(warnings, [attr_node.styleWarning]);
8314
+ });
8315
+ }
8316
+
8317
+ QUnit.test('specifying `<div {{bind-attr style=userValue}}></div>` works properly with a SafeString', function() {
8318
+ view = EmberView['default'].create({
8319
+ userValue: new string.SafeString('42'),
8320
+ template: compile['default']('<div {{bind-attr style=view.userValue}}></div>')
8321
+ });
8322
+
8323
+ utils.runAppend(view);
8324
+
8325
+ deepEqual(warnings, [ ]);
8132
8326
  });
8133
8327
 
8134
8328
  });
@@ -8299,8 +8493,8 @@ enifed('ember-htmlbars/tests/helpers/collection_test', ['ember-views/views/colle
8299
8493
  var container = registry.container();
8300
8494
 
8301
8495
  var ACollectionView = CollectionView['default'].extend({
8302
- tagName: 'ul',
8303
- content: native_array.A(['foo', 'bar', 'baz'])
8496
+ tagName: 'ul',
8497
+ content: native_array.A(['foo', 'bar', 'baz'])
8304
8498
  });
8305
8499
 
8306
8500
  registry.register('view:collectionTest', ACollectionView);
@@ -8499,7 +8693,7 @@ enifed('ember-htmlbars/tests/helpers/collection_test', ['ember-views/views/colle
8499
8693
  equal(view.$('ul li.baz').length, 3, "adds class attribute");
8500
8694
  });
8501
8695
 
8502
- QUnit.test("should give its item views the classBinding specified by itemClassBinding", function() {
8696
+ QUnit.test("should give its item views the class specified by itemClass", function() {
8503
8697
  var ItemClassBindingTestCollectionView = CollectionView['default'].extend({
8504
8698
  tagName: 'ul',
8505
8699
  content: native_array.A([EmberObject['default'].create({ isBaz: false }), EmberObject['default'].create({ isBaz: true }), EmberObject['default'].create({ isBaz: true })])
@@ -8508,7 +8702,7 @@ enifed('ember-htmlbars/tests/helpers/collection_test', ['ember-views/views/colle
8508
8702
  view = EmberView['default'].create({
8509
8703
  itemClassBindingTestCollectionView: ItemClassBindingTestCollectionView,
8510
8704
  isBar: true,
8511
- template: compile['default']('{{#collection view.itemClassBindingTestCollectionView itemClassBinding="view.isBar"}}foo{{/collection}}')
8705
+ template: compile['default']('{{#collection view.itemClassBindingTestCollectionView itemClass=view.isBar}}foo{{/collection}}')
8512
8706
  });
8513
8707
 
8514
8708
  utils.runAppend(view);
@@ -8519,7 +8713,7 @@ enifed('ember-htmlbars/tests/helpers/collection_test', ['ember-views/views/colle
8519
8713
  // to introduce a new keyword that could be used from within `itemClassBinding`. For instance, `itemClassBinding="item.isBaz"`.
8520
8714
  });
8521
8715
 
8522
- QUnit.test("should give its item views the property specified by itemPropertyBinding", function() {
8716
+ QUnit.test("should give its item views the property specified by itemProperty", function() {
8523
8717
  var ItemPropertyBindingTestItemView = EmberView['default'].extend({
8524
8718
  tagName: 'li'
8525
8719
  });
@@ -8534,7 +8728,7 @@ enifed('ember-htmlbars/tests/helpers/collection_test', ['ember-views/views/colle
8534
8728
  return ItemPropertyBindingTestItemView;
8535
8729
  }
8536
8730
  },
8537
- template: compile['default']('{{#collection contentBinding="view.content" tagName="ul" itemViewClass="item-property-binding-test-item-view" itemPropertyBinding="view.baz" preserveContext=false}}{{view.property}}{{/collection}}')
8731
+ template: compile['default']('{{#collection content=view.content tagName="ul" itemViewClass="item-property-binding-test-item-view" itemProperty=view.baz preserveContext=false}}{{view.property}}{{/collection}}')
8538
8732
  });
8539
8733
 
8540
8734
  utils.runAppend(view);
@@ -8556,7 +8750,7 @@ enifed('ember-htmlbars/tests/helpers/collection_test', ['ember-views/views/colle
8556
8750
  view = EmberView['default'].create({
8557
8751
  baz: "baz",
8558
8752
  content: native_array.A([EmberObject['default'].create(), EmberObject['default'].create(), EmberObject['default'].create()]),
8559
- template: compile['default']('{{#collection contentBinding="view.content" itemPropertyBinding="view.baz"}}{{view.property}}{{/collection}}')
8753
+ template: compile['default']('{{#collection content=view.content itemProperty=view.baz}}{{view.property}}{{/collection}}')
8560
8754
  });
8561
8755
 
8562
8756
  utils.runAppend(view);
@@ -8817,7 +9011,7 @@ enifed('ember-htmlbars/tests/helpers/collection_test', ['ember-views/views/colle
8817
9011
  controller: {
8818
9012
  items: items
8819
9013
  },
8820
- template: compile['default']('{{collection contentBinding="items" itemViewClass="an-item"}}')
9014
+ template: compile['default']('{{collection content=items itemViewClass="an-item"}}')
8821
9015
  });
8822
9016
 
8823
9017
  utils.runAppend(view);
@@ -9185,7 +9379,7 @@ enifed('ember-htmlbars/tests/helpers/each_test', ['ember-metal/core', 'ember-run
9185
9379
  var originalLookup = Ember['default'].lookup;
9186
9380
  var lookup;
9187
9381
 
9188
- QUnit.module("the #each helper [DEPRECATED]", {
9382
+ QUnit.module("the scope changing #each helper [DEPRECATED]", {
9189
9383
  setup: function() {
9190
9384
  Ember['default'].lookup = lookup = { Ember: Ember['default'] };
9191
9385
 
@@ -9680,8 +9874,8 @@ enifed('ember-htmlbars/tests/helpers/each_test', ['ember-metal/core', 'ember-run
9680
9874
  QUnit.test("it supports {{itemViewClass=}} with tagName (DEPRECATED)", function() {
9681
9875
  utils.runDestroy(view);
9682
9876
  view = EmberView['default'].create({
9683
- template: templateFor('{{each view.people itemViewClass=MyView tagName="ul"}}'),
9684
- people: people
9877
+ template: templateFor('{{each view.people itemViewClass=MyView tagName="ul"}}'),
9878
+ people: people
9685
9879
  });
9686
9880
 
9687
9881
  expectDeprecation(/Supplying a tagName to Metamorph views is unreliable and is deprecated./);
@@ -10013,7 +10207,7 @@ enifed('ember-htmlbars/tests/helpers/each_test', ['ember-metal/core', 'ember-run
10013
10207
  view = EmberView['default'].create({
10014
10208
  container: container,
10015
10209
  controller: controller,
10016
- template: templateFor('{{#EACH|this|personController}}{{#view controllerBinding="personController"}}{{name}}{{/view}}{{/each}}', useBlockParams)
10210
+ template: templateFor('{{#EACH|this|personController}}{{#view controller=personController}}{{name}}{{/view}}{{/each}}', useBlockParams)
10017
10211
  });
10018
10212
 
10019
10213
  utils.runAppend(view);
@@ -11441,6 +11635,44 @@ enifed('ember-htmlbars/tests/helpers/input_test', ['ember-metal/run_loop', 'embe
11441
11635
  equal(view.$('input').prop('checked'), false, "the checkbox isn't checked yet");
11442
11636
  });
11443
11637
 
11638
+ QUnit.module("{{input type='text'}} - null/undefined values", {
11639
+ teardown: function() {
11640
+ utils.runDestroy(view);
11641
+ }
11642
+ });
11643
+
11644
+ QUnit.test("placeholder attribute bound to undefined is not present", function() {
11645
+ view = View['default'].extend({
11646
+ controller: {},
11647
+ template: compile['default']('{{input placeholder=someThingNotThere}}')
11648
+ }).create();
11649
+
11650
+ utils.runAppend(view);
11651
+
11652
+ ok(!view.element.childNodes[1].hasAttribute('placeholder'), "attribute not present");
11653
+
11654
+ run['default'](null, property_set.set, view, 'controller.someThingNotThere', 'foo');
11655
+
11656
+ equal(view.element.childNodes[1].placeholder, 'foo', "attribute is present");
11657
+ });
11658
+
11659
+ QUnit.test("placeholder attribute bound to null is not present", function() {
11660
+ view = View['default'].extend({
11661
+ controller: {
11662
+ someNullProperty: null
11663
+ },
11664
+ template: compile['default']('{{input placeholder=someNullProperty}}')
11665
+ }).create();
11666
+
11667
+ utils.runAppend(view);
11668
+
11669
+ ok(!view.element.childNodes[1].hasAttribute('placeholder'), "attribute not present");
11670
+
11671
+ run['default'](null, property_set.set, view, 'controller.someNullProperty', 'foo');
11672
+
11673
+ equal(view.element.childNodes[1].placeholder, 'foo', "attribute is present");
11674
+ });
11675
+
11444
11676
  });
11445
11677
  enifed('ember-htmlbars/tests/helpers/input_test.jscs-test', function () {
11446
11678
 
@@ -12454,7 +12686,7 @@ enifed('ember-htmlbars/tests/helpers/unbound_test.jshint', function () {
12454
12686
  });
12455
12687
 
12456
12688
  });
12457
- enifed('ember-htmlbars/tests/helpers/view_test', ['ember-views/views/view', 'container/registry', 'ember-metal/run_loop', 'ember-views/system/jquery', 'ember-views/views/text_field', 'ember-runtime/system/namespace', 'ember-runtime/system/object', 'ember-views/views/container_view', 'ember-views/views/metamorph_view', 'htmlbars-util/safe-string', 'ember-template-compiler/compat/precompile', 'ember-template-compiler/system/compile', 'ember-template-compiler/system/template', 'ember-metal/observer', 'ember-runtime/controllers/controller', 'ember-runtime/tests/utils', 'ember-metal/property_set', 'ember-metal/property_get', 'ember-metal/computed'], function (EmberView, Registry, run, jQuery, TextField, Namespace, EmberObject, ContainerView, _MetamorphView, SafeString, precompile, compile, template, observer, Controller, utils, property_set, property_get, computed) {
12689
+ enifed('ember-htmlbars/tests/helpers/view_test', ['ember-views/views/view', 'container/registry', 'ember-metal/run_loop', 'ember-views/system/jquery', 'ember-views/views/text_field', 'ember-runtime/system/namespace', 'ember-runtime/system/object', 'ember-views/views/container_view', 'ember-views/views/metamorph_view', 'htmlbars-util/safe-string', 'ember-template-compiler/compat/precompile', 'ember-template-compiler/system/compile', 'ember-template-compiler/system/template', 'ember-metal/observer', 'ember-runtime/controllers/controller', 'ember-htmlbars/system/make_bound_helper', 'ember-runtime/tests/utils', 'ember-metal/property_set', 'ember-metal/property_get', 'ember-metal/computed'], function (EmberView, Registry, run, jQuery, TextField, Namespace, EmberObject, ContainerView, _MetamorphView, SafeString, precompile, compile, system__template, observer, Controller, makeBoundHelper, utils, property_set, property_get, computed) {
12458
12690
 
12459
12691
  'use strict';
12460
12692
 
@@ -12486,6 +12718,7 @@ enifed('ember-htmlbars/tests/helpers/view_test', ['ember-views/views/view', 'con
12486
12718
  registry = new Registry['default']();
12487
12719
  container = registry.container();
12488
12720
  registry.optionsForType('template', { instantiate: false });
12721
+ registry.optionsForType('helper', { instantiate: false });
12489
12722
  registry.register('view:default', _MetamorphView['default']);
12490
12723
  registry.register('view:toplevel', EmberView['default'].extend());
12491
12724
  },
@@ -12707,15 +12940,17 @@ enifed('ember-htmlbars/tests/helpers/view_test', ['ember-views/views/view', 'con
12707
12940
  snork: "nerd"
12708
12941
  }).create();
12709
12942
 
12710
- utils.runAppend(view);
12943
+ expectDeprecation(function() {
12944
+ utils.runAppend(view);
12945
+ }, /You're attempting to render a view by passing borfBinding to a view helper without a quoted value, but this syntax is ambiguous. You should either surround borfBinding's value in quotes or remove `Binding` from borfBinding./);
12711
12946
 
12712
12947
  equal(jQuery['default']('#lol').text(), "nerd", "awkward mixed syntax treated like binding");
12713
12948
 
12714
12949
  Ember.warn = oldWarn;
12715
12950
  });
12716
12951
 
12717
- QUnit.test('"Binding"-suffixed bindings are runloop-synchronized', function() {
12718
- expect(5);
12952
+ QUnit.test('"Binding"-suffixed bindings are runloop-synchronized [DEPRECATED]', function() {
12953
+ expect(6);
12719
12954
 
12720
12955
  var subview;
12721
12956
 
@@ -12734,7 +12969,10 @@ enifed('ember-htmlbars/tests/helpers/view_test', ['ember-views/views/view', 'con
12734
12969
  });
12735
12970
 
12736
12971
  view = View.create();
12737
- utils.runAppend(view);
12972
+
12973
+ expectDeprecation(function() {
12974
+ utils.runAppend(view);
12975
+ }, /You're attempting to render a view by passing colorBinding to a view helper, but this syntax is deprecated. You should use `color=someValue` instead./);
12738
12976
 
12739
12977
  equal(view.$('h1 .color').text(), 'mauve', 'renders bound value');
12740
12978
 
@@ -12853,6 +13091,30 @@ enifed('ember-htmlbars/tests/helpers/view_test', ['ember-views/views/view', 'con
12853
13091
  ok(jQuery['default']('#foo').hasClass('foo'), "Always applies classbinding without condition");
12854
13092
  });
12855
13093
 
13094
+ QUnit.test("Should apply a class from a sub expression", function() {
13095
+ registry.register('helper:string-concat', makeBoundHelper['default'](function(params) {
13096
+ return params.join('');
13097
+ }));
13098
+
13099
+ view = EmberView['default'].create({
13100
+ container: container,
13101
+ controller: {
13102
+ type: 'btn',
13103
+ size: 'large'
13104
+ },
13105
+ template: compile['default']('{{#view id="foo" class=(string-concat type "-" size)}} Foo{{/view}}')
13106
+ });
13107
+
13108
+ utils.runAppend(view);
13109
+
13110
+ ok(jQuery['default']('#foo').hasClass('btn-large'), "applies classname from subexpression");
13111
+
13112
+ run['default'](view, view.set, 'controller.size', 'medium');
13113
+
13114
+ ok(!jQuery['default']('#foo').hasClass('btn-large'), "removes classname from subexpression update");
13115
+ ok(jQuery['default']('#foo').hasClass('btn-medium'), "adds classname from subexpression update");
13116
+ });
13117
+
12856
13118
  QUnit.test("Should not apply classes when bound property specified is false", function() {
12857
13119
  view = EmberView['default'].create({
12858
13120
  controller: {
@@ -13403,7 +13665,7 @@ enifed('ember-htmlbars/tests/helpers/view_test', ['ember-views/views/view', 'con
13403
13665
  view = EmberView['default'].create({
13404
13666
  name: 'myView',
13405
13667
  textField: TextField['default'],
13406
- template: compile['default']('{{view view.textField valueBinding="view.name"}}')
13668
+ template: compile['default']('{{view view.textField value=view.name}}')
13407
13669
  });
13408
13670
 
13409
13671
  utils.runAppend(view);
@@ -13475,7 +13737,7 @@ enifed('ember-htmlbars/tests/helpers/view_test', ['ember-views/views/view', 'con
13475
13737
  name: 'foo'
13476
13738
  }),
13477
13739
  Subview: Subview,
13478
- template: compile['default']('<h1>{{view view.Subview colorBinding="color" someControllerBinding="this"}}</h1>')
13740
+ template: compile['default']('<h1>{{view view.Subview color=color someController=this}}</h1>')
13479
13741
  });
13480
13742
 
13481
13743
  view = View.create();
@@ -13572,7 +13834,7 @@ enifed('ember-htmlbars/tests/helpers/view_test', ['ember-views/views/view', 'con
13572
13834
 
13573
13835
  QUnit.test('should work with precompiled templates', function() {
13574
13836
  var templateString = precompile['default']('{{view.value}}');
13575
- var compiledTemplate = template['default'](eval(templateString));
13837
+ var compiledTemplate = system__template['default'](eval(templateString));
13576
13838
 
13577
13839
  view = EmberView['default'].create({
13578
13840
  value: 'rendered',
@@ -13590,7 +13852,7 @@ enifed('ember-htmlbars/tests/helpers/view_test', ['ember-views/views/view', 'con
13590
13852
  equal(view.$().text(), 'updated', 'the precompiled template was updated');
13591
13853
  });
13592
13854
 
13593
- QUnit.test('bindings should be relative to the current context', function() {
13855
+ QUnit.test('bindings should be relative to the current context [DEPRECATED]', function() {
13594
13856
  view = EmberView['default'].create({
13595
13857
  museumOpen: true,
13596
13858
 
@@ -13606,12 +13868,14 @@ enifed('ember-htmlbars/tests/helpers/view_test', ['ember-views/views/view', 'con
13606
13868
  template: compile['default']('{{#if view.museumOpen}} {{view view.museumView nameBinding="view.museumDetails.name" dollarsBinding="view.museumDetails.price"}} {{/if}}')
13607
13869
  });
13608
13870
 
13609
- utils.runAppend(view);
13871
+ expectDeprecation(function() {
13872
+ utils.runAppend(view);
13873
+ }, /You're attempting to render a view by passing .+Binding to a view helper, but this syntax is deprecated/);
13610
13874
 
13611
13875
  equal(trim(view.$().text()), 'Name: SFMoMA Price: $20', 'should print baz twice');
13612
13876
  });
13613
13877
 
13614
- QUnit.test('bindings should respect keywords', function() {
13878
+ QUnit.test('bindings should respect keywords [DEPRECATED]', function() {
13615
13879
  view = EmberView['default'].create({
13616
13880
  museumOpen: true,
13617
13881
 
@@ -13630,6 +13894,32 @@ enifed('ember-htmlbars/tests/helpers/view_test', ['ember-views/views/view', 'con
13630
13894
  template: compile['default']('{{#if view.museumOpen}}{{view view.museumView nameBinding="controller.museumDetails.name" dollarsBinding="controller.museumDetails.price"}}{{/if}}')
13631
13895
  });
13632
13896
 
13897
+ expectDeprecation(function() {
13898
+ utils.runAppend(view);
13899
+ }, /You're attempting to render a view by passing .+Binding to a view helper, but this syntax is deprecated/);
13900
+
13901
+ equal(trim(view.$().text()), 'Name: SFMoMA Price: $20', 'should print baz twice');
13902
+ });
13903
+
13904
+ QUnit.test('should respect keywords', function() {
13905
+ view = EmberView['default'].create({
13906
+ museumOpen: true,
13907
+
13908
+ controller: {
13909
+ museumOpen: true,
13910
+ museumDetails: EmberObject['default'].create({
13911
+ name: 'SFMoMA',
13912
+ price: 20
13913
+ })
13914
+ },
13915
+
13916
+ museumView: EmberView['default'].extend({
13917
+ template: compile['default']('Name: {{view.name}} Price: ${{view.dollars}}')
13918
+ }),
13919
+
13920
+ template: compile['default']('{{#if view.museumOpen}}{{view view.museumView name=controller.museumDetails.name dollars=controller.museumDetails.price}}{{/if}}')
13921
+ });
13922
+
13633
13923
  utils.runAppend(view);
13634
13924
 
13635
13925
  equal(trim(view.$().text()), 'Name: SFMoMA Price: $20', 'should print baz twice');
@@ -13734,6 +14024,44 @@ enifed('ember-htmlbars/tests/helpers/view_test', ['ember-views/views/view', 'con
13734
14024
  }, /must be a subclass or an instance of Ember.View/);
13735
14025
  });
13736
14026
 
14027
+ QUnit.test('Specifying `id` to {{view}} is set on the view.', function() {
14028
+ registry.register('view:derp', EmberView['default'].extend({
14029
+ template: compile['default']('<div id="view-id">{{view.id}}</div><div id="view-elementId">{{view.elementId}}</div>')
14030
+ }));
14031
+
14032
+ view = EmberView['default'].create({
14033
+ container: container,
14034
+ foo: 'bar',
14035
+ template: compile['default']('{{view "derp" id=view.foo}}')
14036
+ });
14037
+
14038
+ utils.runAppend(view);
14039
+
14040
+ equal(view.$('#bar').length, 1, 'it uses the provided id for the views elementId');
14041
+ equal(view.$('#view-id').text(), 'bar', 'the views id property is set');
14042
+ equal(view.$('#view-elementId').text(), 'bar', 'the views elementId property is set');
14043
+ });
14044
+
14045
+ QUnit.test('Specifying `id` to {{view}} does not allow bound id changes.', function() {
14046
+ registry.register('view:derp', EmberView['default'].extend({
14047
+ template: compile['default']('<div id="view-id">{{view.id}}</div><div id="view-elementId">{{view.elementId}}</div>')
14048
+ }));
14049
+
14050
+ view = EmberView['default'].create({
14051
+ container: container,
14052
+ foo: 'bar',
14053
+ template: compile['default']('{{view "derp" id=view.foo}}')
14054
+ });
14055
+
14056
+ utils.runAppend(view);
14057
+
14058
+ equal(view.$('#view-id').text(), 'bar', 'the views id property is set');
14059
+
14060
+ run['default'](view, property_set.set, view, 'foo', 'baz');
14061
+
14062
+ equal(view.$('#view-id').text(), 'bar', 'the views id property is not changed');
14063
+ });
14064
+
13737
14065
  });
13738
14066
  enifed('ember-htmlbars/tests/helpers/view_test.jscs-test', function () {
13739
14067
 
@@ -14464,7 +14792,7 @@ enifed('ember-htmlbars/tests/helpers/yield_test', ['ember-metal/run_loop', 'embe
14464
14792
 
14465
14793
  view = EmberView['default'].create({
14466
14794
  controller: { boundText: "outer", component: component },
14467
- template: compile['default']('{{#with boundText as item}}{{#view component contentBinding="item"}}{{item}}{{/view}}{{/with}}')
14795
+ template: compile['default']('{{#with boundText as item}}{{#view component content=item}}{{item}}{{/view}}{{/with}}')
14468
14796
  });
14469
14797
 
14470
14798
  utils.runAppend(view);
@@ -15594,7 +15922,7 @@ enifed('ember-htmlbars/tests/integration/select_in_template_test', ['ember-runti
15594
15922
  }
15595
15923
  });
15596
15924
 
15597
- QUnit.test("works from a template with bindings", function() {
15925
+ QUnit.test("works from a template with bindings [DEPRECATED]", function() {
15598
15926
  var Person = EmberObject['default'].extend({
15599
15927
  id: null,
15600
15928
  firstName: null,
@@ -15635,6 +15963,70 @@ enifed('ember-htmlbars/tests/integration/select_in_template_test', ['ember-runti
15635
15963
  )
15636
15964
  });
15637
15965
 
15966
+ expectDeprecation(function() {
15967
+ utils.runAppend(view);
15968
+ }, /You're attempting to render a view by passing .+Binding to a view helper, but this syntax is deprecated/);
15969
+
15970
+ var select = view.get('select');
15971
+ ok(select.$().length, "Select was rendered");
15972
+ equal(select.$('option').length, 5, "Options were rendered");
15973
+ equal(select.$().text(), "Pick a person:Yehuda KatzTom DalePeter WagenetErik Bryn\n", "Option values were rendered");
15974
+ equal(select.get('selection'), null, "Nothing has been selected");
15975
+
15976
+ run['default'](function() {
15977
+ application.selectedPersonController.set('person', erik);
15978
+ });
15979
+
15980
+ equal(select.get('selection'), erik, "Selection was updated through binding");
15981
+ run['default'](function() {
15982
+ application.peopleController.pushObject(Person.create({ id: 5, firstName: "James", lastName: "Rosen" }));
15983
+ });
15984
+
15985
+ equal(select.$('option').length, 6, "New option was added");
15986
+ equal(select.get('selection'), erik, "Selection was maintained after new option was added");
15987
+ });
15988
+
15989
+ QUnit.test("works from a template", function() {
15990
+ var Person = EmberObject['default'].extend({
15991
+ id: null,
15992
+ firstName: null,
15993
+ lastName: null,
15994
+
15995
+ fullName: computed.computed(function() {
15996
+ return this.get('firstName') + " " + this.get('lastName');
15997
+ }).property('firstName', 'lastName')
15998
+ });
15999
+
16000
+ var erik = Person.create({ id: 4, firstName: 'Erik', lastName: 'Bryn' });
16001
+
16002
+ var application = Namespace['default'].create();
16003
+
16004
+ application.peopleController = ArrayController['default'].create({
16005
+ content: Ember.A([
16006
+ Person.create({ id: 1, firstName: 'Yehuda', lastName: 'Katz' }),
16007
+ Person.create({ id: 2, firstName: 'Tom', lastName: 'Dale' }),
16008
+ Person.create({ id: 3, firstName: 'Peter', lastName: 'Wagenet' }),
16009
+ erik
16010
+ ])
16011
+ });
16012
+
16013
+ application.selectedPersonController = EmberObject['default'].create({
16014
+ person: null
16015
+ });
16016
+
16017
+ view = EmberView['default'].create({
16018
+ app: application,
16019
+ selectView: SelectView['default'],
16020
+ template: compile['default'](
16021
+ '{{view view.selectView viewName="select"' +
16022
+ ' content=view.app.peopleController' +
16023
+ ' optionLabelPath="content.fullName"' +
16024
+ ' optionValuePath="content.id"' +
16025
+ ' prompt="Pick a person:"' +
16026
+ ' selection=view.app.selectedPersonController.person}}'
16027
+ )
16028
+ });
16029
+
15638
16030
  utils.runAppend(view);
15639
16031
 
15640
16032
  var select = view.get('select');
@@ -15665,8 +16057,8 @@ enifed('ember-htmlbars/tests/integration/select_in_template_test', ['ember-runti
15665
16057
  selectView: SelectView['default'],
15666
16058
  template: compile['default'](
15667
16059
  '{{view view.selectView viewName="select"' +
15668
- ' contentBinding="view.user.options"' +
15669
- ' selectionBinding="view.user.selectedOption"}}'
16060
+ ' content=view.user.options' +
16061
+ ' selection=view.user.selectedOption}}'
15670
16062
  )
15671
16063
  });
15672
16064
 
@@ -15700,8 +16092,8 @@ enifed('ember-htmlbars/tests/integration/select_in_template_test', ['ember-runti
15700
16092
  selectView: SelectView['default'],
15701
16093
  template: compile['default'](
15702
16094
  '{{view view.selectView viewName="select"' +
15703
- ' contentBinding="view.proxy"' +
15704
- ' selectionBinding="view.proxy.selectedOption"}}'
16095
+ ' content=view.proxy' +
16096
+ ' selection=view.proxy.selectedOption}}'
15705
16097
  )
15706
16098
  });
15707
16099
 
@@ -15746,7 +16138,9 @@ enifed('ember-htmlbars/tests/integration/select_in_template_test', ['ember-runti
15746
16138
  equal(selectEl.selectedIndex, 1, "The DOM is updated to reflect the new selection");
15747
16139
  }
15748
16140
 
15749
- QUnit.test("select element should correctly initialize and update selectedIndex and bound properties when using valueBinding (old xBinding='' syntax)", function() {
16141
+ QUnit.test("select element should correctly initialize and update selectedIndex and bound properties when using valueBinding [DEPRECATED]", function() {
16142
+ expectDeprecation(/You're attempting to render a view by passing .+Binding to a view helper, but this syntax is deprecated./);
16143
+
15750
16144
  testValueBinding(
15751
16145
  '{{view view.selectView viewName="select"' +
15752
16146
  ' contentBinding="view.collection"' +
@@ -15757,7 +16151,7 @@ enifed('ember-htmlbars/tests/integration/select_in_template_test', ['ember-runti
15757
16151
  );
15758
16152
  });
15759
16153
 
15760
- QUnit.test("select element should correctly initialize and update selectedIndex and bound properties when using valueBinding (new quoteless binding shorthand)", function() {
16154
+ QUnit.test("select element should correctly initialize and update selectedIndex and bound properties when using a bound value", function() {
15761
16155
  testValueBinding(
15762
16156
  '{{view view.selectView viewName="select"' +
15763
16157
  ' content=view.collection' +
@@ -15796,7 +16190,9 @@ enifed('ember-htmlbars/tests/integration/select_in_template_test', ['ember-runti
15796
16190
  equal(select.$('option:eq(1)').prop('selected'), true, "Selected property is set to proper option");
15797
16191
  }
15798
16192
 
15799
- QUnit.test("select element should correctly initialize and update selectedIndex and bound properties when using selectionBinding (old xBinding='' syntax)", function() {
16193
+ QUnit.test("select element should correctly initialize and update selectedIndex and bound properties when using selectionBinding [DEPRECATED]", function() {
16194
+ expectDeprecation(/You're attempting to render a view by passing .+Binding to a view helper, but this syntax is deprecated./);
16195
+
15800
16196
  testSelectionBinding(
15801
16197
  '{{view view.selectView viewName="select"' +
15802
16198
  ' contentBinding="view.collection"' +
@@ -15807,7 +16203,7 @@ enifed('ember-htmlbars/tests/integration/select_in_template_test', ['ember-runti
15807
16203
  );
15808
16204
  });
15809
16205
 
15810
- QUnit.test("select element should correctly initialize and update selectedIndex and bound properties when using selectionBinding (new quoteless binding shorthand)", function() {
16206
+ QUnit.test("select element should correctly initialize and update selectedIndex and bound properties when using a bound selection", function() {
15811
16207
  testSelectionBinding(
15812
16208
  '{{view view.selectView viewName="select"' +
15813
16209
  ' content=view.collection' +
@@ -16961,7 +17357,7 @@ enifed('ember-htmlbars/tests/system/render_view_test', ['ember-runtime/tests/uti
16961
17357
  view = EmberView['default'].create({
16962
17358
  template: {
16963
17359
  isHTMLBars: true,
16964
- revision: 'Ember@1.11.0-beta.5.1501308c',
17360
+ revision: 'Ember@1.11.0',
16965
17361
  render: function(view, env, contextualElement, blockArguments) {
16966
17362
  for (var i = 0, l = keyNames.length; i < l; i++) {
16967
17363
  var keyName = keyNames[i];
@@ -30905,6 +31301,26 @@ enifed('ember-routing-htmlbars/tests/helpers/render_test', ['ember-metal/core',
30905
31301
  }, "The second argument of {{render}} must be a path, e.g. {{render \"post\" post}}.");
30906
31302
  });
30907
31303
 
31304
+ QUnit.test("{{render}} helper should let view provide its own template", function() {
31305
+ var template = "{{render 'fish'}}";
31306
+ var controller = controllers__controller["default"].extend({ container: container });
31307
+ view = EmberView['default'].create({
31308
+ controller: controller.create(),
31309
+ template: compile['default'](template)
31310
+ });
31311
+
31312
+ container._registry.register('template:fish', compile['default']('Hello fish!'));
31313
+ container._registry.register('template:other', compile['default']('Hello other!'));
31314
+
31315
+ container._registry.register('view:fish', EmberView['default'].extend({
31316
+ templateName: 'other'
31317
+ }));
31318
+
31319
+ tests__utils.runAppend(view);
31320
+
31321
+ equal(view.$().text(), 'Hello other!');
31322
+ });
31323
+
30908
31324
  });
30909
31325
  enifed('ember-routing-htmlbars/tests/helpers/render_test.jscs-test', function () {
30910
31326
 
@@ -31838,14 +32254,14 @@ enifed('ember-routing/tests/location/hash_location_test', ['ember-metal/core', '
31838
32254
  var pathname = (tmp.pathname.match(/^\//)) ? tmp.pathname : '/' + tmp.pathname;
31839
32255
 
31840
32256
  return {
31841
- hash: tmp.hash,
31842
- host: tmp.host || 'localhost',
31843
- hostname: tmp.hostname || 'localhost',
31844
- href: tmp.href,
31845
- pathname: pathname,
31846
- port: tmp.port || '',
31847
- protocol: protocol,
31848
- search: tmp.search
32257
+ hash: tmp.hash,
32258
+ host: tmp.host || 'localhost',
32259
+ hostname: tmp.hostname || 'localhost',
32260
+ href: tmp.href,
32261
+ pathname: pathname,
32262
+ port: tmp.port || '',
32263
+ protocol: protocol,
32264
+ search: tmp.search
31849
32265
  };
31850
32266
  }
31851
32267
 
@@ -32044,14 +32460,14 @@ enifed('ember-routing/tests/location/history_location_test', ['ember-metal/prope
32044
32460
  var pathname = (tmp.pathname.match(/^\//)) ? tmp.pathname : '/' + tmp.pathname;
32045
32461
 
32046
32462
  return {
32047
- hash: tmp.hash,
32048
- host: tmp.host || 'localhost',
32049
- hostname: tmp.hostname || 'localhost',
32050
- href: tmp.href,
32051
- pathname: pathname,
32052
- port: tmp.port || '',
32053
- protocol: protocol,
32054
- search: tmp.search
32463
+ hash: tmp.hash,
32464
+ host: tmp.host || 'localhost',
32465
+ hostname: tmp.hostname || 'localhost',
32466
+ href: tmp.href,
32467
+ pathname: pathname,
32468
+ port: tmp.port || '',
32469
+ protocol: protocol,
32470
+ search: tmp.search
32055
32471
  };
32056
32472
  }
32057
32473
 
@@ -32494,8 +32910,8 @@ enifed('ember-routing/tests/system/dsl_test', ['ember-routing/system/router', 'e
32494
32910
  ok(router.router.recognizer.names['bleep.bloop.blork'], 'parent name was used as base of nested routes');
32495
32911
  });
32496
32912
 
32497
-
32498
32913
  // jscs:disable validateIndentation
32914
+
32499
32915
 
32500
32916
  QUnit.test("should add loading and error routes if _isRouterMapResult is true", function() {
32501
32917
  Router.map(function() {
@@ -32523,8 +32939,8 @@ enifed('ember-routing/tests/system/dsl_test', ['ember-routing/system/router', 'e
32523
32939
  ok(!router.router.recognizer.names['blork_error'], 'error route was not added');
32524
32940
  });
32525
32941
 
32526
- // jscs:enable validateIndentation
32527
32942
 
32943
+ // jscs:enable validateIndentation
32528
32944
 
32529
32945
  });
32530
32946
  enifed('ember-routing/tests/system/dsl_test.jscs-test', function () {
@@ -34650,18 +35066,18 @@ enifed('ember-runtime/tests/computed/reduce_computed_macros_test', ['ember-metal
34650
35066
  QUnit.test("it throws an error if given fewer or more than two dependent properties", function() {
34651
35067
  throws(function () {
34652
35068
  EmberObject['default'].createWithMixins({
34653
- array: Ember['default'].A([1,2,3,4,5,6,7]),
34654
- array2: Ember['default'].A([3,4,5]),
34655
- diff: reduce_computed_macros.setDiff('array')
35069
+ array: Ember['default'].A([1,2,3,4,5,6,7]),
35070
+ array2: Ember['default'].A([3,4,5]),
35071
+ diff: reduce_computed_macros.setDiff('array')
34656
35072
  });
34657
35073
  }, /requires exactly two dependent arrays/, "setDiff requires two dependent arrays");
34658
35074
 
34659
35075
  throws(function () {
34660
35076
  EmberObject['default'].createWithMixins({
34661
- array: Ember['default'].A([1,2,3,4,5,6,7]),
34662
- array2: Ember['default'].A([3,4,5]),
34663
- array3: Ember['default'].A([7]),
34664
- diff: reduce_computed_macros.setDiff('array', 'array2', 'array3')
35077
+ array: Ember['default'].A([1,2,3,4,5,6,7]),
35078
+ array2: Ember['default'].A([3,4,5]),
35079
+ array3: Ember['default'].A([7]),
35080
+ diff: reduce_computed_macros.setDiff('array', 'array2', 'array3')
34665
35081
  });
34666
35082
  }, /requires exactly two dependent arrays/, "setDiff requires two dependent arrays");
34667
35083
  });
@@ -35688,7 +36104,7 @@ enifed('ember-runtime/tests/computed/reduce_computed_test', ['ember-metal/core',
35688
36104
 
35689
36105
  QUnit.test("after the first retrieval, array computed properties observe additions to dependent arrays", function() {
35690
36106
  var numbers = property_get.get(obj, 'numbers');
35691
- // set up observers
36107
+ // set up observers
35692
36108
  var evenNumbers = property_get.get(obj, 'evenNumbers');
35693
36109
 
35694
36110
  run['default'](function() {
@@ -35700,7 +36116,7 @@ enifed('ember-runtime/tests/computed/reduce_computed_test', ['ember-metal/core',
35700
36116
 
35701
36117
  QUnit.test("after the first retrieval, array computed properties observe removals from dependent arrays", function() {
35702
36118
  var numbers = property_get.get(obj, 'numbers');
35703
- // set up observers
36119
+ // set up observers
35704
36120
  var evenNumbers = property_get.get(obj, 'evenNumbers');
35705
36121
 
35706
36122
  run['default'](function() {
@@ -36619,7 +37035,7 @@ enifed('ember-runtime/tests/computed/reduce_computed_test.jshint', function () {
36619
37035
  });
36620
37036
 
36621
37037
  });
36622
- enifed('ember-runtime/tests/controllers/array_controller_test', ['ember-metal/core', 'ember-runtime/tests/suites/mutable_array', 'ember-runtime/controllers/array_controller'], function (Ember, MutableArrayTests, ArrayController) {
37038
+ enifed('ember-runtime/tests/controllers/array_controller_test', ['ember-metal/core', 'ember-runtime/tests/suites/mutable_array', 'ember-runtime/controllers/array_controller', 'ember-metal/property_set', 'ember-metal/property_get'], function (Ember, MutableArrayTests, ArrayController, property_set, property_get) {
36623
37039
 
36624
37040
  'use strict';
36625
37041
 
@@ -36644,6 +37060,8 @@ enifed('ember-runtime/tests/controllers/array_controller_test', ['ember-metal/co
36644
37060
  }
36645
37061
  }).run();
36646
37062
 
37063
+ QUnit.module("ember-runtime: array_controller");
37064
+
36647
37065
  QUnit.test("defaults its `model` to an empty array", function () {
36648
37066
  var Controller = ArrayController['default'].extend();
36649
37067
  deepEqual(Controller.create().get("model"), [], "`ArrayController` defaults its model to an empty array");
@@ -36651,13 +37069,34 @@ enifed('ember-runtime/tests/controllers/array_controller_test', ['ember-metal/co
36651
37069
  equal(Controller.create().get('lastObject'), undefined, 'can fetch lastObject');
36652
37070
  });
36653
37071
 
36654
-
36655
37072
  QUnit.test("Ember.ArrayController length property works even if model was not set initially", function() {
36656
37073
  var controller = ArrayController['default'].create();
36657
37074
  controller.pushObject('item');
36658
37075
  equal(controller.get('length'), 1);
36659
37076
  });
36660
37077
 
37078
+ QUnit.test('works properly when model is set to an Ember.A()', function() {
37079
+ var controller = ArrayController['default'].create();
37080
+
37081
+ property_set.set(controller, 'model', Ember['default'].A(['red', 'green']));
37082
+
37083
+ deepEqual(property_get.get(controller, 'model'), ['red', 'green'], "can set model as an Ember.Array");
37084
+ });
37085
+
37086
+ QUnit.test('works properly when model is set to a plain array', function() {
37087
+ var controller = ArrayController['default'].create();
37088
+
37089
+ if (Ember['default'].EXTEND_PROTOTYPES) {
37090
+ property_set.set(controller, 'model', ['red', 'green']);
37091
+
37092
+ deepEqual(property_get.get(controller, 'model'), ['red', 'green'], "can set model as a plain array");
37093
+ } else {
37094
+ expectAssertion(function() {
37095
+ property_set.set(controller, 'model', ['red', 'green']);
37096
+ }, /ArrayController expects `model` to implement the Ember.Array mixin. This can often be fixed by wrapping your model with `Ember\.A\(\)`./);
37097
+ }
37098
+ });
37099
+
36661
37100
  });
36662
37101
  enifed('ember-runtime/tests/controllers/array_controller_test.jscs-test', function () {
36663
37102
 
@@ -36679,7 +37118,7 @@ enifed('ember-runtime/tests/controllers/array_controller_test.jshint', function
36679
37118
  });
36680
37119
 
36681
37120
  });
36682
- enifed('ember-runtime/tests/controllers/controller_test', ['ember-runtime/controllers/controller', 'ember-runtime/system/service', 'ember-runtime/controllers/object_controller', 'ember-metal/mixin', 'ember-runtime/system/object', 'ember-runtime/system/container', 'ember-runtime/inject', 'ember-metal/property_get'], function (Controller, Service, object_controller, Mixin, Object, system__container, inject, property_get) {
37121
+ enifed('ember-runtime/tests/controllers/controller_test', ['ember-runtime/controllers/controller', 'ember-runtime/system/service', 'ember-runtime/controllers/array_controller', 'ember-runtime/controllers/object_controller', 'ember-metal/mixin', 'ember-runtime/system/object', 'ember-runtime/system/container', 'ember-runtime/inject', 'ember-metal/property_get'], function (Controller, Service, ArrayController, object_controller, Mixin, Object, system__container, inject, property_get) {
36683
37122
 
36684
37123
  'use strict';
36685
37124
 
@@ -36895,6 +37334,42 @@ enifed('ember-runtime/tests/controllers/controller_test', ['ember-runtime/contro
36895
37334
  equal(postsController, postController.get('postsController'), "controller.posts is injected");
36896
37335
  });
36897
37336
 
37337
+ QUnit.test("controllers can be injected into ObjectControllers", function() {
37338
+ var registry = new system__container.Registry();
37339
+ var container = registry.container();
37340
+
37341
+ registry.register('controller:post', Controller['default'].extend({
37342
+ postsController: inject['default'].controller('posts')
37343
+ }));
37344
+
37345
+ registry.register('controller:posts', object_controller["default"].extend());
37346
+
37347
+ var postController = container.lookup('controller:post');
37348
+ var postsController;
37349
+ expectDeprecation(function() {
37350
+ postsController = container.lookup('controller:posts');
37351
+ }, object_controller.objectControllerDeprecation);
37352
+
37353
+ equal(postsController, postController.get('postsController'), "controller.posts is injected");
37354
+ });
37355
+
37356
+ QUnit.test("controllers can be injected into ArrayControllers", function() {
37357
+ var registry = new system__container.Registry();
37358
+ var container = registry.container();
37359
+
37360
+ registry.register('controller:post', Controller['default'].extend({
37361
+ postsController: inject['default'].controller('posts')
37362
+ }));
37363
+
37364
+ registry.register('controller:posts', ArrayController['default'].extend());
37365
+
37366
+ var postController = container.lookup('controller:post');
37367
+ var postsController = container.lookup('controller:posts');
37368
+
37369
+ equal(postsController, postController.get('postsController'), "controller.posts is injected");
37370
+ });
37371
+
37372
+
36898
37373
  QUnit.test("services can be injected into controllers", function() {
36899
37374
  var registry = new system__container.Registry();
36900
37375
  var container = registry.container();
@@ -39349,7 +39824,7 @@ enifed('ember-runtime/tests/legacy_1x/mixins/observable/propertyChanges_test', [
39349
39824
  equal(ObjectA.prop, "propValue");
39350
39825
  ObjectA.endPropertyChanges();
39351
39826
 
39352
- //end inner nest
39827
+ //end inner nest
39353
39828
  ObjectA.set('prop', 'changePropValue');
39354
39829
  equal(ObjectA.newFoo, "newFooValue");
39355
39830
 
@@ -39686,9 +40161,9 @@ enifed('ember-runtime/tests/legacy_1x/system/binding_test', ['ember-metal/core',
39686
40161
  });
39687
40162
 
39688
40163
  TestNamespace.toObject = EmberObject['default'].createWithMixins({
39689
- valueBinding: ember_metal__binding.Binding.from('TestNamespace.fromObject.value'),
39690
- localValue: "originalLocal",
39691
- relativeBinding: ember_metal__binding.Binding.from('localValue')
40164
+ valueBinding: ember_metal__binding.Binding.from('TestNamespace.fromObject.value'),
40165
+ localValue: "originalLocal",
40166
+ relativeBinding: ember_metal__binding.Binding.from('localValue')
39692
40167
  });
39693
40168
  });
39694
40169
  },
@@ -39994,7 +40469,7 @@ enifed('ember-runtime/tests/legacy_1x/system/object/bindings_test', ['ember-meta
39994
40469
  teardown: function() {
39995
40470
  Ember['default'].lookup = originalLookup;
39996
40471
  TestObject = fromObject = extraObject = null;
39997
- // delete TestNamespace;
40472
+ // delete TestNamespace;
39998
40473
  }
39999
40474
 
40000
40475
  };
@@ -40571,8 +41046,8 @@ enifed('ember-runtime/tests/legacy_1x/system/set_test', ['ember-metal/core', 'em
40571
41046
  });
40572
41047
 
40573
41048
  QUnit.module("Set.pop + Set.copy", {
40574
- // generate a set with every type of object, but none of the specific
40575
- // ones we add in the tests below...
41049
+ // generate a set with every type of object, but none of the specific
41050
+ // ones we add in the tests below...
40576
41051
  setup: function() {
40577
41052
  ignoreDeprecation(function() {
40578
41053
  set = new Set['default'](Ember['default'].A([
@@ -43204,8 +43679,7 @@ enifed('ember-runtime/tests/suites/array', ['exports', 'ember-runtime/tests/suit
43204
43679
  'use strict';
43205
43680
 
43206
43681
  var ObserverClass = enumerable.ObserverClass.extend({
43207
-
43208
- observeArray: function(obj) {
43682
+ observeArray: function(obj) {
43209
43683
  obj.addArrayObserver(this);
43210
43684
  return this;
43211
43685
  },
@@ -52187,7 +52661,7 @@ enifed('ember-template-compiler/tests/system/compile_test', ['ember-template-com
52187
52661
 
52188
52662
  var actual = compile['default'](templateString);
52189
52663
 
52190
- equal(actual.revision, 'Ember@1.11.0-beta.5.1501308c', 'revision is included in generated template');
52664
+ equal(actual.revision, 'Ember@1.11.0', 'revision is included in generated template');
52191
52665
  });
52192
52666
 
52193
52667
  QUnit.test('the template revision is different than the HTMLBars default revision', function() {
@@ -52423,7 +52897,7 @@ enifed('ember-testing/test.jshint', function () {
52423
52897
  });
52424
52898
 
52425
52899
  });
52426
- enifed('ember-testing/tests/acceptance_test', ['ember-metal/run_loop', 'ember-views/system/jquery', 'ember-testing/test', 'ember-testing/adapters/qunit', 'ember-views/views/view', 'ember-testing/initializers', 'ember-application/system/application', 'ember-routing/system/route', 'ember-template-compiler/system/compile', 'ember-routing'], function (run, jQuery, Test, QUnitAdapter, EmberView, __dep5__, EmberApplication, EmberRoute, compile) {
52900
+ enifed('ember-testing/tests/acceptance_test', ['ember-metal/run_loop', 'ember-views/system/jquery', 'ember-testing/test', 'ember-testing/adapters/qunit', 'ember-views/views/view', 'ember-testing/initializers', 'ember-application/system/application', 'ember-routing/system/route', 'ember-template-compiler/system/compile', 'ember-runtime/ext/rsvp', 'ember-routing'], function (run, jQuery, Test, QUnitAdapter, EmberView, __dep5__, EmberApplication, EmberRoute, compile, RSVP) {
52427
52901
 
52428
52902
  'use strict';
52429
52903
 
@@ -52486,7 +52960,7 @@ enifed('ember-testing/tests/acceptance_test', ['ember-metal/run_loop', 'ember-vi
52486
52960
  });
52487
52961
 
52488
52962
  Test['default'].registerAsyncHelper('slowHelper', function() {
52489
- return Test['default'].promise(function(resolve) {
52963
+ return new RSVP['default'].Promise(function(resolve) {
52490
52964
  setTimeout(resolve, 10);
52491
52965
  });
52492
52966
  });
@@ -54786,26 +55260,6 @@ enifed('ember-views/system/renderer.jshint', function () {
54786
55260
  ok(true, 'ember-views/system/renderer.js should pass jshint.');
54787
55261
  });
54788
55262
 
54789
- });
54790
- enifed('ember-views/system/sanitize_attribute_value.jscs-test', function () {
54791
-
54792
- 'use strict';
54793
-
54794
- module('JSCS - ember-views/system');
54795
- test('ember-views/system/sanitize_attribute_value.js should pass jscs', function() {
54796
- ok(true, 'ember-views/system/sanitize_attribute_value.js should pass jscs.');
54797
- });
54798
-
54799
- });
54800
- enifed('ember-views/system/sanitize_attribute_value.jshint', function () {
54801
-
54802
- 'use strict';
54803
-
54804
- module('JSHint - ember-views/system');
54805
- test('ember-views/system/sanitize_attribute_value.js should pass jshint', function() {
54806
- ok(true, 'ember-views/system/sanitize_attribute_value.js should pass jshint.');
54807
- });
54808
-
54809
55263
  });
54810
55264
  enifed('ember-views/system/utils.jscs-test', function () {
54811
55265
 
@@ -55936,84 +56390,6 @@ enifed('ember-views/tests/system/render_buffer_test.jshint', function () {
55936
56390
  ok(true, 'ember-views/tests/system/render_buffer_test.js should pass jshint.');
55937
56391
  });
55938
56392
 
55939
- });
55940
- enifed('ember-views/tests/system/sanitize_attribute_value_test', ['ember-views/system/sanitize_attribute_value', 'ember-htmlbars/utils/string', 'dom-helper'], function (sanitizeAttributeValue, string, DOMHelper) {
55941
-
55942
- 'use strict';
55943
-
55944
- QUnit.module('ember-views: sanitizeAttributeValue(null, "href")');
55945
-
55946
- var goodProtocols = ['https', 'http', 'ftp', 'tel', 'file'];
55947
- var dom = new DOMHelper['default']();
55948
-
55949
- for (var i = 0, l = goodProtocols.length; i < l; i++) {
55950
- buildProtocolTest(goodProtocols[i]);
55951
- }
55952
-
55953
- function buildProtocolTest(protocol) {
55954
- QUnit.test('allows ' + protocol + ' protocol when element is not provided', function() {
55955
- expect(1);
55956
-
55957
- var expected = protocol + '://foo.com';
55958
- var actual = sanitizeAttributeValue['default'](dom, null, 'href', expected);
55959
-
55960
- equal(actual, expected, 'protocol not escaped');
55961
- });
55962
- }
55963
-
55964
- QUnit.test('blocks javascript: protocol', function() {
55965
- /* jshint scripturl:true */
55966
-
55967
- expect(1);
55968
-
55969
- var expected = 'javascript:alert("foo")';
55970
- var actual = sanitizeAttributeValue['default'](dom, null, 'href', expected);
55971
-
55972
- equal(actual, 'unsafe:' + expected, 'protocol escaped');
55973
- });
55974
-
55975
- QUnit.test('blocks blacklisted protocols', function() {
55976
- /* jshint scripturl:true */
55977
-
55978
- expect(1);
55979
-
55980
- var expected = 'javascript:alert("foo")';
55981
- var actual = sanitizeAttributeValue['default'](dom, null, 'href', expected);
55982
-
55983
- equal(actual, 'unsafe:' + expected, 'protocol escaped');
55984
- });
55985
-
55986
- QUnit.test('does not block SafeStrings', function() {
55987
- /* jshint scripturl:true */
55988
-
55989
- expect(1);
55990
-
55991
- var expected = 'javascript:alert("foo")';
55992
- var actual = sanitizeAttributeValue['default'](dom, null, 'href', new string.SafeString(expected));
55993
-
55994
- equal(actual, expected, 'protocol unescaped');
55995
- });
55996
-
55997
- });
55998
- enifed('ember-views/tests/system/sanitize_attribute_value_test.jscs-test', function () {
55999
-
56000
- 'use strict';
56001
-
56002
- module('JSCS - ember-views/tests/system');
56003
- test('ember-views/tests/system/sanitize_attribute_value_test.js should pass jscs', function() {
56004
- ok(true, 'ember-views/tests/system/sanitize_attribute_value_test.js should pass jscs.');
56005
- });
56006
-
56007
- });
56008
- enifed('ember-views/tests/system/sanitize_attribute_value_test.jshint', function () {
56009
-
56010
- 'use strict';
56011
-
56012
- module('JSHint - ember-views/tests/system');
56013
- test('ember-views/tests/system/sanitize_attribute_value_test.js should pass jshint', function() {
56014
- ok(true, 'ember-views/tests/system/sanitize_attribute_value_test.js should pass jshint.');
56015
- });
56016
-
56017
56393
  });
56018
56394
  enifed('ember-views/tests/system/view_utils_test', ['ember-metal/run_loop', 'ember-views/views/view'], function (run, View) {
56019
56395
 
@@ -56868,10 +57244,10 @@ enifed('ember-views/tests/views/collection_test', ['ember-metal/core', 'ember-me
56868
57244
  Ember['default'].lookup = {
56869
57245
  App: {
56870
57246
  EmptyView: View['default'].extend({
56871
- tagName: 'kbd',
56872
- render: function(buf) {
56873
- buf.push("THIS IS AN EMPTY VIEW");
56874
- }
57247
+ tagName: 'kbd',
57248
+ render: function(buf) {
57249
+ buf.push("THIS IS AN EMPTY VIEW");
57250
+ }
56875
57251
  })
56876
57252
  }
56877
57253
  };
@@ -62224,7 +62600,7 @@ enifed('ember-views/tests/views/view/inject_test.jshint', function () {
62224
62600
  });
62225
62601
 
62226
62602
  });
62227
- enifed('ember-views/tests/views/view/is_visible_test', ['ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/run_loop', 'ember-views/views/view', 'ember-views/views/container_view'], function (property_get, property_set, run, EmberView, ContainerView) {
62603
+ enifed('ember-views/tests/views/view/is_visible_test', ['ember-metal/property_get', 'ember-metal/property_set', 'ember-metal/run_loop', 'ember-views/views/view', 'ember-views/views/container_view', 'ember-template-compiler/system/compile'], function (property_get, property_set, run, EmberView, ContainerView, compile) {
62228
62604
 
62229
62605
  'use strict';
62230
62606
 
@@ -62350,8 +62726,28 @@ enifed('ember-views/tests/views/view/is_visible_test', ['ember-metal/property_ge
62350
62726
  });
62351
62727
 
62352
62728
  QUnit.test("view should be notified after isVisible is set to false and the element has been hidden", function() {
62353
- view = View.create({ isVisible: true });
62354
- var childView = view.get('childViews').objectAt(0);
62729
+ run['default'](function() {
62730
+ view = View.create({ isVisible: false });
62731
+ view.append();
62732
+ });
62733
+
62734
+ ok(view.$().is(':hidden'), "precond - view is hidden when appended");
62735
+
62736
+ run['default'](function() {
62737
+ view.set('isVisible', true);
62738
+ });
62739
+
62740
+ ok(view.$().is(':visible'), "precond - view is now visible");
62741
+ equal(parentBecameVisible, 1);
62742
+ equal(childBecameVisible, 1);
62743
+ equal(grandchildBecameVisible, 1);
62744
+ });
62745
+
62746
+ QUnit.test("view should change visibility with a virtual childView", function() {
62747
+ view = View.create({
62748
+ isVisible: true,
62749
+ template: compile['default']('<div {{bind-attr bing="tweep"}}></div>')
62750
+ });
62355
62751
 
62356
62752
  run['default'](function() {
62357
62753
  view.append();
@@ -62360,13 +62756,10 @@ enifed('ember-views/tests/views/view/is_visible_test', ['ember-metal/property_ge
62360
62756
  ok(view.$().is(':visible'), "precond - view is visible when appended");
62361
62757
 
62362
62758
  run['default'](function() {
62363
- childView.set('isVisible', false);
62759
+ view.set('isVisible', false);
62364
62760
  });
62365
62761
 
62366
- ok(childView.$().is(':hidden'), "precond - view is now hidden");
62367
-
62368
- equal(childBecameHidden, 1);
62369
- equal(grandchildBecameHidden, 1);
62762
+ ok(view.$().is(':hidden'), "precond - view is now hidden");
62370
62763
  });
62371
62764
 
62372
62765
  QUnit.test("view should be notified after isVisible is set to true and the element has been shown", function() {
@@ -65517,7 +65910,7 @@ enifed('ember/tests/helpers/helper_registration_test', ['ember', 'ember-htmlbars
65517
65910
  ok(!helpers['x-borf'], "Container-registered helper doesn't wind up on global helpers hash");
65518
65911
  });
65519
65912
 
65520
- // need to make `makeBoundHelper` for HTMLBars
65913
+ // need to make `makeBoundHelper` for HTMLBars
65521
65914
  QUnit.test("Bound helpers registered on the container can be late-invoked", function() {
65522
65915
  Ember.TEMPLATES.application = compile("<div id='wrapper'>{{x-reverse}} {{x-reverse foo}}</div>");
65523
65916
 
@@ -65532,8 +65925,8 @@ enifed('ember/tests/helpers/helper_registration_test', ['ember', 'ember-htmlbars
65532
65925
  ok(!helpers['x-reverse'], "Container-registered helper doesn't wind up on global helpers hash");
65533
65926
  });
65534
65927
 
65535
- // we have unit tests for this in ember-htmlbars/tests/system/lookup-helper
65536
- // and we are not going to recreate the handlebars helperMissing concept
65928
+ // we have unit tests for this in ember-htmlbars/tests/system/lookup-helper
65929
+ // and we are not going to recreate the handlebars helperMissing concept
65537
65930
  QUnit.test("Undashed helpers registered on the container can not (presently) be invoked", function() {
65538
65931
 
65539
65932
  // Note: the reason we're not allowing undashed helpers is to avoid
@@ -67224,7 +67617,7 @@ enifed('ember/tests/helpers/link_to_test', ['ember', 'ember-runtime/controllers/
67224
67617
  equal(router.get('location.path'), '/about');
67225
67618
  }
67226
67619
 
67227
- var aboutDefer;
67620
+ var aboutDefer, otherDefer;
67228
67621
 
67229
67622
  if (!Ember.FEATURES.isEnabled('ember-routing-transitioning-classes')) {
67230
67623
  QUnit.module("The {{link-to}} helper: eager URL updating", {
@@ -67362,12 +67755,20 @@ enifed('ember/tests/helpers/link_to_test', ['ember', 'ember-runtime/controllers/
67362
67755
  });
67363
67756
 
67364
67757
  App.AboutRoute = Ember.Route.extend({
67365
- model: function() {
67758
+ model: function () {
67366
67759
  aboutDefer = Ember.RSVP.defer();
67367
67760
  return aboutDefer.promise;
67368
67761
  }
67369
67762
  });
67370
67763
 
67764
+ App.OtherRoute = Ember.Route.extend({
67765
+ model: function () {
67766
+ otherDefer = Ember.RSVP.defer();
67767
+ return otherDefer.promise;
67768
+ }
67769
+ });
67770
+
67771
+
67371
67772
  Ember.TEMPLATES.application = compile("{{outlet}}{{link-to 'Index' 'index' id='index-link'}}{{link-to 'About' 'about' id='about-link'}}{{link-to 'Other' 'other' id='other-link'}}");
67372
67773
  });
67373
67774
  },
@@ -67408,6 +67809,85 @@ enifed('ember/tests/helpers/link_to_test', ['ember', 'ember-runtime/controllers/
67408
67809
  assertHasClass('ember-transitioning-in', $index, false, $about, false, $other, false);
67409
67810
  assertHasClass('ember-transitioning-out', $index, false, $about, false, $other, false);
67410
67811
  });
67812
+
67813
+ QUnit.test("while a transition is underway with nested link-to's", function() {
67814
+ expect(54);
67815
+
67816
+ Router.map(function() {
67817
+ this.route('parent-route', function() {
67818
+ this.route('about');
67819
+ this.route('other');
67820
+ });
67821
+ });
67822
+
67823
+ App.ParentRouteAboutRoute = Ember.Route.extend({
67824
+ model: function () {
67825
+ aboutDefer = Ember.RSVP.defer();
67826
+ return aboutDefer.promise;
67827
+ }
67828
+ });
67829
+
67830
+ App.ParentRouteOtherRoute = Ember.Route.extend({
67831
+ model: function () {
67832
+ otherDefer = Ember.RSVP.defer();
67833
+ return otherDefer.promise;
67834
+ }
67835
+ });
67836
+
67837
+ Ember.TEMPLATES.application = compile("{{outlet}} {{#link-to 'index' tagName='li'}} {{link-to 'Index' 'index' id='index-link'}} {{/link-to}} {{#link-to 'parent-route.about' tagName='li'}} {{link-to 'About' 'parent-route.about' id='about-link'}} {{/link-to}} {{#link-to 'parent-route.other' tagName='li'}} {{link-to 'Other' 'parent-route.other' id='other-link'}} {{/link-to}}");
67838
+
67839
+ bootApplication();
67840
+
67841
+ function assertHasClass(className) {
67842
+ var i = 1;
67843
+ while (i < arguments.length) {
67844
+ var $a = arguments[i];
67845
+ var shouldHaveClass = arguments[i+1];
67846
+ equal($a.hasClass(className), shouldHaveClass, $a.attr('id') + " should " + (shouldHaveClass ? '' : "not ") + "have class " + className);
67847
+ i +=2;
67848
+ }
67849
+ }
67850
+
67851
+ var $index = Ember.$('#index-link');
67852
+ var $about = Ember.$('#about-link');
67853
+ var $other = Ember.$('#other-link');
67854
+
67855
+ Ember.run($about, 'click');
67856
+
67857
+ assertHasClass('active', $index, true, $about, false, $other, false);
67858
+ assertHasClass('ember-transitioning-in', $index, false, $about, true, $other, false);
67859
+ assertHasClass('ember-transitioning-out', $index, true, $about, false, $other, false);
67860
+
67861
+ Ember.run(aboutDefer, 'resolve');
67862
+
67863
+ assertHasClass('active', $index, false, $about, true, $other, false);
67864
+ assertHasClass('ember-transitioning-in', $index, false, $about, false, $other, false);
67865
+ assertHasClass('ember-transitioning-out', $index, false, $about, false, $other, false);
67866
+
67867
+ Ember.run($other, 'click');
67868
+
67869
+ assertHasClass('active', $index, false, $about, true, $other, false);
67870
+ assertHasClass('ember-transitioning-in', $index, false, $about, false, $other, true);
67871
+ assertHasClass('ember-transitioning-out', $index, false, $about, true, $other, false);
67872
+
67873
+ Ember.run(otherDefer, 'resolve');
67874
+
67875
+ assertHasClass('active', $index, false, $about, false, $other, true);
67876
+ assertHasClass('ember-transitioning-in', $index, false, $about, false, $other, false);
67877
+ assertHasClass('ember-transitioning-out', $index, false, $about, false, $other, false);
67878
+
67879
+ Ember.run($about, 'click');
67880
+
67881
+ assertHasClass('active', $index, false, $about, false, $other, true);
67882
+ assertHasClass('ember-transitioning-in', $index, false, $about, true, $other, false);
67883
+ assertHasClass('ember-transitioning-out', $index, false, $about, false, $other, true);
67884
+
67885
+ Ember.run(aboutDefer, 'resolve');
67886
+
67887
+ assertHasClass('active', $index, false, $about, true, $other, false);
67888
+ assertHasClass('ember-transitioning-in', $index, false, $about, false, $other, false);
67889
+ assertHasClass('ember-transitioning-out', $index, false, $about, false, $other, false);
67890
+ });
67411
67891
 
67412
67892
 
67413
67893
  });
@@ -67537,6 +68017,8 @@ enifed('ember/tests/routing/basic_test', ['ember', 'ember-metal/enumerable_utils
67537
68017
 
67538
68018
  'use strict';
67539
68019
 
68020
+ var trim = Ember.$.trim;
68021
+
67540
68022
  var compile = EmberHandlebars['default'].compile;
67541
68023
 
67542
68024
  var Router, App, router, registry, container, originalLoggerError;
@@ -71139,6 +71621,247 @@ enifed('ember/tests/routing/basic_test', ['ember', 'ember-metal/enumerable_utils
71139
71621
  equal(Ember.$('#qunit-fixture').text(), "A-The index-B-Hello world-C", "second render");
71140
71622
  });
71141
71623
 
71624
+ QUnit.test("Can render routes with no 'main' outlet and their children", function() {
71625
+ Ember.TEMPLATES.application = compile('<div id="application">{{outlet "app"}}</div>');
71626
+ Ember.TEMPLATES.app = compile('<div id="app-common">{{outlet "common"}}</div><div id="app-sub">{{outlet "sub"}}</div>');
71627
+ Ember.TEMPLATES.common = compile('<div id="common"></div>');
71628
+ Ember.TEMPLATES.sub = compile('<div id="sub"></div>');
71629
+
71630
+ Router.map(function() {
71631
+ this.route('app', { path: "/app" }, function() {
71632
+ this.resource('sub', { path: "/sub" });
71633
+ });
71634
+ });
71635
+
71636
+ App.AppRoute = Ember.Route.extend({
71637
+ renderTemplate : function() {
71638
+ this.render('app', {
71639
+ outlet: 'app',
71640
+ into: 'application'
71641
+ });
71642
+ this.render('common', {
71643
+ outlet: 'common',
71644
+ into: 'app'
71645
+ });
71646
+ }
71647
+ });
71648
+
71649
+ App.SubRoute = Ember.Route.extend({
71650
+ renderTemplate : function() {
71651
+ this.render('sub', {
71652
+ outlet: 'sub',
71653
+ into: 'app'
71654
+ });
71655
+ }
71656
+ });
71657
+
71658
+ bootApplication();
71659
+ handleURL('/app');
71660
+ equal(Ember.$('#app-common #common').length, 1, "Finds common while viewing /app");
71661
+ handleURL('/app/sub');
71662
+ equal(Ember.$('#app-common #common').length, 1, "Finds common while viewing /app/sub");
71663
+ equal(Ember.$('#app-sub #sub').length, 1, "Finds sub while viewing /app/sub");
71664
+ });
71665
+
71666
+ QUnit.test("Tolerates stacked renders", function() {
71667
+ Ember.TEMPLATES.application = compile('{{outlet}}{{outlet "modal"}}');
71668
+ Ember.TEMPLATES.index = compile('hi');
71669
+ Ember.TEMPLATES.layer = compile('layer');
71670
+ App.ApplicationRoute = Ember.Route.extend({
71671
+ actions: {
71672
+ openLayer: function() {
71673
+ this.render('layer', {
71674
+ into: 'application',
71675
+ outlet: 'modal'
71676
+ });
71677
+ },
71678
+ close: function() {
71679
+ this.disconnectOutlet({
71680
+ outlet: 'modal',
71681
+ parentView: 'application'
71682
+ });
71683
+ }
71684
+ }
71685
+ });
71686
+ bootApplication();
71687
+ equal(trim(Ember.$('#qunit-fixture').text()), 'hi');
71688
+ Ember.run(router, 'send', 'openLayer');
71689
+ equal(trim(Ember.$('#qunit-fixture').text()), 'hilayer');
71690
+ Ember.run(router, 'send', 'openLayer');
71691
+ equal(trim(Ember.$('#qunit-fixture').text()), 'hilayer');
71692
+ Ember.run(router, 'send', 'close');
71693
+ equal(trim(Ember.$('#qunit-fixture').text()), 'hi');
71694
+ });
71695
+
71696
+ QUnit.test("Renders child into parent with non-default template name", function() {
71697
+ Ember.TEMPLATES.application = compile('<div class="a">{{outlet}}</div>');
71698
+ Ember.TEMPLATES['exports/root'] = compile('<div class="b">{{outlet}}</div>');
71699
+ Ember.TEMPLATES['exports/index'] = compile('<div class="c"></div>');
71700
+
71701
+ Router.map(function() {
71702
+ this.route('root', function() {
71703
+ });
71704
+ });
71705
+
71706
+ App.RootRoute = Ember.Route.extend({
71707
+ renderTemplate: function() {
71708
+ this.render('exports/root');
71709
+ }
71710
+ });
71711
+
71712
+ App.RootIndexRoute = Ember.Route.extend({
71713
+ renderTemplate: function() {
71714
+ this.render('exports/index');
71715
+ }
71716
+ });
71717
+
71718
+ bootApplication();
71719
+ handleURL('/root');
71720
+ equal(Ember.$('#qunit-fixture .a .b .c').length, 1);
71721
+ });
71722
+
71723
+ QUnit.test("Allows any route to disconnectOutlet another route's templates", function() {
71724
+ Ember.TEMPLATES.application = compile('{{outlet}}{{outlet "modal"}}');
71725
+ Ember.TEMPLATES.index = compile('hi');
71726
+ Ember.TEMPLATES.layer = compile('layer');
71727
+ App.ApplicationRoute = Ember.Route.extend({
71728
+ actions: {
71729
+ openLayer: function() {
71730
+ this.render('layer', {
71731
+ into: 'application',
71732
+ outlet: 'modal'
71733
+ });
71734
+ }
71735
+ }
71736
+ });
71737
+ App.IndexRoute = Ember.Route.extend({
71738
+ actions: {
71739
+ close: function() {
71740
+ this.disconnectOutlet({
71741
+ parentView: 'application',
71742
+ outlet: 'modal'
71743
+ });
71744
+ }
71745
+ }
71746
+ });
71747
+ bootApplication();
71748
+ equal(trim(Ember.$('#qunit-fixture').text()), 'hi');
71749
+ Ember.run(router, 'send', 'openLayer');
71750
+ equal(trim(Ember.$('#qunit-fixture').text()), 'hilayer');
71751
+ Ember.run(router, 'send', 'close');
71752
+ equal(trim(Ember.$('#qunit-fixture').text()), 'hi');
71753
+ });
71754
+
71755
+ QUnit.test("Can render({into:...}) the render helper", function() {
71756
+ Ember.TEMPLATES.application = compile('{{render "foo"}}');
71757
+ Ember.TEMPLATES.foo = compile('<div class="foo">{{outlet}}</div>');
71758
+ Ember.TEMPLATES.index = compile('other');
71759
+ Ember.TEMPLATES.bar = compile('bar');
71760
+
71761
+ App.IndexRoute = Ember.Route.extend({
71762
+ renderTemplate: function() {
71763
+ this.render({ into: 'foo' });
71764
+ },
71765
+ actions: {
71766
+ changeToBar: function() {
71767
+ this.disconnectOutlet({
71768
+ parentView: 'foo',
71769
+ outlet: 'main'
71770
+ });
71771
+ this.render('bar', { into: 'foo' });
71772
+ }
71773
+ }
71774
+ });
71775
+
71776
+ bootApplication();
71777
+ equal(Ember.$('#qunit-fixture .foo').text(), 'other');
71778
+ Ember.run(router, 'send', 'changeToBar');
71779
+ equal(Ember.$('#qunit-fixture .foo').text(), 'bar');
71780
+ });
71781
+
71782
+ QUnit.test("Can disconnect from the render helper", function() {
71783
+ Ember.TEMPLATES.application = compile('{{render "foo"}}');
71784
+ Ember.TEMPLATES.foo = compile('<div class="foo">{{outlet}}</div>');
71785
+ Ember.TEMPLATES.index = compile('other');
71786
+
71787
+ App.IndexRoute = Ember.Route.extend({
71788
+ renderTemplate: function() {
71789
+ this.render({ into: 'foo' });
71790
+ },
71791
+ actions: {
71792
+ disconnect: function() {
71793
+ this.disconnectOutlet({
71794
+ parentView: 'foo',
71795
+ outlet: 'main'
71796
+ });
71797
+ }
71798
+ }
71799
+ });
71800
+
71801
+ bootApplication();
71802
+ equal(Ember.$('#qunit-fixture .foo').text(), 'other');
71803
+ Ember.run(router, 'send', 'disconnect');
71804
+ equal(Ember.$('#qunit-fixture .foo').text(), '');
71805
+ });
71806
+
71807
+
71808
+ QUnit.test("Can render({into:...}) the render helper's children", function() {
71809
+ Ember.TEMPLATES.application = compile('{{render "foo"}}');
71810
+ Ember.TEMPLATES.foo = compile('<div class="foo">{{outlet}}</div>');
71811
+ Ember.TEMPLATES.index = compile('<div class="index">{{outlet}}</div>');
71812
+ Ember.TEMPLATES.other = compile('other');
71813
+ Ember.TEMPLATES.bar = compile('bar');
71814
+
71815
+ App.IndexRoute = Ember.Route.extend({
71816
+ renderTemplate: function() {
71817
+ this.render({ into: 'foo' });
71818
+ this.render('other', { into: 'index' });
71819
+ },
71820
+ actions: {
71821
+ changeToBar: function() {
71822
+ this.disconnectOutlet({
71823
+ parentView: 'index',
71824
+ outlet: 'main'
71825
+ });
71826
+ this.render('bar', { into: 'index' });
71827
+ }
71828
+ }
71829
+ });
71830
+
71831
+ bootApplication();
71832
+ equal(Ember.$('#qunit-fixture .foo .index').text(), 'other');
71833
+ Ember.run(router, 'send', 'changeToBar');
71834
+ equal(Ember.$('#qunit-fixture .foo .index').text(), 'bar');
71835
+
71836
+ });
71837
+
71838
+ QUnit.test("Can disconnect from the render helper's children", function() {
71839
+ Ember.TEMPLATES.application = compile('{{render "foo"}}');
71840
+ Ember.TEMPLATES.foo = compile('<div class="foo">{{outlet}}</div>');
71841
+ Ember.TEMPLATES.index = compile('<div class="index">{{outlet}}</div>');
71842
+ Ember.TEMPLATES.other = compile('other');
71843
+
71844
+ App.IndexRoute = Ember.Route.extend({
71845
+ renderTemplate: function() {
71846
+ this.render({ into: 'foo' });
71847
+ this.render('other', { into: 'index' });
71848
+ },
71849
+ actions: {
71850
+ disconnect: function() {
71851
+ this.disconnectOutlet({
71852
+ parentView: 'index',
71853
+ outlet: 'main'
71854
+ });
71855
+ }
71856
+ }
71857
+ });
71858
+
71859
+ bootApplication();
71860
+ equal(Ember.$('#qunit-fixture .foo .index').text(), 'other');
71861
+ Ember.run(router, 'send', 'disconnect');
71862
+ equal(Ember.$('#qunit-fixture .foo .index').text(), '');
71863
+ });
71864
+
71142
71865
  });
71143
71866
  enifed('ember/tests/routing/basic_test.jscs-test', function () {
71144
71867
 
@@ -71279,6 +72002,30 @@ enifed('ember/tests/routing/query_params_test', ['ember', 'ember-metal/computed'
71279
72002
  }
71280
72003
  });
71281
72004
 
72005
+ QUnit.test("Single query params can be set on ObjectController [DEPRECATED]", function() {
72006
+ expectDeprecation("Ember.ObjectController is deprecated, please use Ember.Controller and use `model.propertyName`.");
72007
+
72008
+ Router.map(function() {
72009
+ this.route("home", { path: '/' });
72010
+ });
72011
+
72012
+ App.HomeController = Ember.ObjectController.extend({
72013
+ queryParams: ['foo'],
72014
+ foo: "123"
72015
+ });
72016
+
72017
+ bootApplication();
72018
+
72019
+ var controller = container.lookup('controller:home');
72020
+
72021
+ setAndFlush(controller, 'foo', '456');
72022
+
72023
+ equal(router.get('location.path'), "/?foo=456");
72024
+
72025
+ setAndFlush(controller, 'foo', '987');
72026
+ equal(router.get('location.path'), "/?foo=987");
72027
+ });
72028
+
71282
72029
  QUnit.test("Single query params can be set", function() {
71283
72030
  Router.map(function() {
71284
72031
  this.route("home", { path: '/' });