From 75f66fcf946c70eb593a5f98dbe69f0a2c7b65e3 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Sun, 27 Mar 2016 11:57:38 -0400 Subject: [PATCH] Remove support for _ENABLE_LEGACY_CONTROLLER_SUPPORT flag. --- .../lib/system/application.js | 8 +- .../tests/system/application_test.js | 34 ++++-- .../ember-htmlbars/lib/hooks/bind-self.js | 23 +--- .../lib/hooks/bind-shadow-scope.js | 11 -- .../lib/hooks/create-fresh-scope.js | 7 -- .../tests/compat/controller_keyword_test.js | 100 ------------------ .../ember-htmlbars/tests/helpers/view_test.js | 77 +------------- packages/ember-metal/tests/libraries_test.js | 6 +- .../lib/keywords/render.js | 7 +- .../tests/helpers/element_action_test.js | 28 ----- .../tests/helpers/outlet_test.js | 27 ----- .../tests/helpers/render_test.js | 44 -------- .../assert-no-view-and-controller-paths.js | 3 +- tests/index.html | 3 +- 14 files changed, 41 insertions(+), 337 deletions(-) delete mode 100644 packages/ember-htmlbars/tests/compat/controller_keyword_test.js diff --git a/packages/ember-application/lib/system/application.js b/packages/ember-application/lib/system/application.js index 84ea87c6650..ba403fca988 100644 --- a/packages/ember-application/lib/system/application.js +++ b/packages/ember-application/lib/system/application.js @@ -3,7 +3,7 @@ @submodule ember-application */ import Ember from 'ember-metal'; // Ember.libraries, LOG_VERSION, Namespace, BOOTED -import { assert, debug, deprecate } from 'ember-metal/debug'; +import { assert, debug, warn, deprecate } from 'ember-metal/debug'; import { get } from 'ember-metal/property_get'; import { runLoadHooks } from 'ember-runtime/system/lazy_load'; import run from 'ember-metal/run_loop'; @@ -605,10 +605,10 @@ const Application = Engine.extend({ } if (Ember.ENV._ENABLE_LEGACY_CONTROLLER_SUPPORT && !warnedAboutLegacyControllerAddon) { - deprecate( - 'Support for the `ember-legacy-controllers` addon will end soon, please remove it from your application.', + warn( + 'Support for the `ember-legacy-controllers` has been removed, please remove it from your application.', false, - { id: 'ember-legacy-controllers', until: '2.6.0', url: 'http://emberjs.com/deprecations/v1.x/#toc_objectcontroller' } + { id: 'ember-legacy-controllers', url: 'http://emberjs.com/deprecations/v1.x/#toc_objectcontroller' } ); warnedAboutLegacyControllerAddon = true; diff --git a/packages/ember-application/tests/system/application_test.js b/packages/ember-application/tests/system/application_test.js index 30e7ab66835..e61bc1f993d 100644 --- a/packages/ember-application/tests/system/application_test.js +++ b/packages/ember-application/tests/system/application_test.js @@ -18,12 +18,13 @@ import { getDebugFunction, setDebugFunction } from 'ember-metal/debug'; var trim = jQuery.trim; -var app, application, originalLookup, originalDebug; +var app, application, originalLookup, originalDebug, originalWarn; QUnit.module('Ember.Application', { setup() { originalLookup = Ember.lookup; originalDebug = getDebugFunction('debug'); + originalWarn = getDebugFunction('warn'); jQuery('#qunit-fixture').html('
HI
HI
'); run(function() { @@ -34,6 +35,7 @@ QUnit.module('Ember.Application', { teardown() { jQuery('#qunit-fixture').empty(); setDebugFunction('debug', originalDebug); + setDebugFunction('warn', originalWarn); Ember.lookup = originalLookup; @@ -363,12 +365,18 @@ QUnit.module('Ember.Application - legacy addon deprecation warnings', { _ENABLE_LEGACY_CONTROLLER_SUPPORT: false }); + originalDebug = getDebugFunction('debug'); + originalWarn = getDebugFunction('warn'); + _resetLegacyAddonWarnings(); }, teardown() { Ember.ENV = originalEmberENV; + setDebugFunction('debug', originalDebug); + setDebugFunction('warn', originalWarn); + if (app) { run(app, 'destroy'); } @@ -407,16 +415,28 @@ QUnit.test('it does not warn about the ember-legacy-controllers addon on first b }); QUnit.test('it warns about the ember-legacy-controllers addon on first boot when installed', function() { + if (EmberDev.runningProdBuild) { + ok(true, 'warnings are disabled in prod builds'); + return; + } + Ember.ENV._ENABLE_LEGACY_CONTROLLER_SUPPORT = true; - expectDeprecation(() => { - app = run(Application, 'create'); - }, 'Support for the `ember-legacy-controllers` addon will end soon, please remove it from your application.'); + let warning; + setDebugFunction('warn', function(message, test) { + if (!test) { + warning = message; + } + }); + + app = run(Application, 'create'); + + equal(warning, 'Support for the `ember-legacy-controllers` has been removed, please remove it from your application.'); run(app, 'destroy'); + warning = null; // It should not warn again on second boot - expectNoDeprecation(() => { - app = run(Application, 'create'); - }); + app = run(Application, 'create'); + equal(warning, null); }); diff --git a/packages/ember-htmlbars/lib/hooks/bind-self.js b/packages/ember-htmlbars/lib/hooks/bind-self.js index 1656d4674d8..e0cb892e1b0 100644 --- a/packages/ember-htmlbars/lib/hooks/bind-self.js +++ b/packages/ember-htmlbars/lib/hooks/bind-self.js @@ -6,27 +6,12 @@ import _Ember from 'ember-metal'; import ProxyStream from 'ember-metal/streams/proxy-stream'; -export default function bindSelf(env, scope, _self) { - let self = _self; - - if (self && self.hasBoundController) { - let { controller } = self; - self = self.self; - - if (!!_Ember.ENV._ENABLE_LEGACY_CONTROLLER_SUPPORT) { - scope.bindLocal('controller', newStream(controller || self)); - } - } - +export default function bindSelf(env, scope, self) { if (self && self.isView) { if (!!_Ember.ENV._ENABLE_LEGACY_VIEW_SUPPORT) { scope.bindLocal('view', newStream(self, 'view')); } - if (!!_Ember.ENV._ENABLE_LEGACY_CONTROLLER_SUPPORT) { - scope.bindLocal('controller', newStream(self, '').getKey('controller')); - } - let selfStream = newStream(self, ''); if (self.isGlimmerComponent) { @@ -40,12 +25,6 @@ export default function bindSelf(env, scope, _self) { let selfStream = newStream(self, ''); scope.bindSelf(selfStream); - - if (!!_Ember.ENV._ENABLE_LEGACY_CONTROLLER_SUPPORT) { - if (!scope.hasLocal('controller')) { - scope.bindLocal('controller', selfStream); - } - } } function newStream(newValue, key) { diff --git a/packages/ember-htmlbars/lib/hooks/bind-shadow-scope.js b/packages/ember-htmlbars/lib/hooks/bind-shadow-scope.js index b37c1109b01..2b0352a8b0c 100644 --- a/packages/ember-htmlbars/lib/hooks/bind-shadow-scope.js +++ b/packages/ember-htmlbars/lib/hooks/bind-shadow-scope.js @@ -8,21 +8,10 @@ import ProxyStream from 'ember-metal/streams/proxy-stream'; export default function bindShadowScope(env, parentScope, shadowScope, options) { if (!options) { return; } - let didOverrideController = false; - - if (parentScope && parentScope.overrideController) { - didOverrideController = true; - shadowScope.bindLocal('controller', parentScope.getLocal('controller')); - } - var view = options.view; if (view && !view.isComponent) { shadowScope.bindLocal('view', newStream(view, 'view')); - if (!didOverrideController) { - shadowScope.bindLocal('controller', newStream(shadowScope.getLocal('view').getKey('controller'))); - } - if (view.isView) { shadowScope.bindSelf(newStream(shadowScope.getLocal('view').getKey('context'), '')); } diff --git a/packages/ember-htmlbars/lib/hooks/create-fresh-scope.js b/packages/ember-htmlbars/lib/hooks/create-fresh-scope.js index 82b18a70067..c2d69759254 100644 --- a/packages/ember-htmlbars/lib/hooks/create-fresh-scope.js +++ b/packages/ember-htmlbars/lib/hooks/create-fresh-scope.js @@ -24,13 +24,6 @@ import EmptyObject from 'ember-metal/empty_object'; use the component itself as the `this`. * If `self` is a view, two special locals are created: `view` and `controller`. These locals are legacy semantics. - * If self has a `hasBoundController` property, it is coming from - a legacy form of #with - (`{{#with something controller=someController}}`). This has - the special effect of giving the child scope the supplied - `controller` keyword, with an unrelated `self`. This is - legacy functionality, as both the `view` and `controller` - keywords have been deprecated. **IMPORTANT**: There are two places in Ember where the ambient controller is looked up. Both of those places use the presence diff --git a/packages/ember-htmlbars/tests/compat/controller_keyword_test.js b/packages/ember-htmlbars/tests/compat/controller_keyword_test.js deleted file mode 100644 index e1f2e043547..00000000000 --- a/packages/ember-htmlbars/tests/compat/controller_keyword_test.js +++ /dev/null @@ -1,100 +0,0 @@ -import Ember from 'ember-metal/core'; -import EmberComponent from 'ember-views/components/component'; -import { runAppend, runDestroy } from 'ember-runtime/tests/utils'; -import compile from 'ember-template-compiler/system/compile'; - -import { registerAstPlugin, removeAstPlugin } from 'ember-htmlbars/tests/utils'; -import AssertNoViewAndControllerPaths from 'ember-template-compiler/plugins/assert-no-view-and-controller-paths'; - -let component; - -import isEnabled from 'ember-metal/features'; -if (!isEnabled('ember-glimmer')) { - // jscs:disable -QUnit.module('ember-htmlbars: compat - controller keyword (use as a path)', { - setup() { - Ember.ENV._ENABLE_LEGACY_CONTROLLER_SUPPORT = false; - registerAstPlugin(AssertNoViewAndControllerPaths); - - component = null; - }, - teardown() { - runDestroy(component); - - removeAstPlugin(AssertNoViewAndControllerPaths); - Ember.ENV._ENABLE_LEGACY_CONTROLLER_SUPPORT = true; - } -}); - -QUnit.test('reading the controller keyword fails assertion', function() { - var text = 'a-prop'; - expectAssertion(function() { - component = EmberComponent.extend({ - prop: text, - layout: compile('{{controller.prop}}') - }).create(); - - runAppend(component); - }, /Using `{{controller}}` or any path based on it .*/); -}); - -QUnit.module('ember-htmlbars: compat - controller keyword (use as a path) [LEGACY]', { - setup() { - component = null; - }, - teardown() { - runDestroy(component); - } -}); - -QUnit.test('reading the controller keyword works [LEGACY]', function() { - var text = 'a-prop'; - ignoreAssertion(function() { - component = EmberComponent.extend({ - prop: text, - layout: compile('{{controller.prop}}') - }).create(); - }, /Using `{{controller}}` or any path based on it .*/); - - runAppend(component); - equal(component.$().text(), text, 'controller keyword is read'); -}); - -QUnit.test('reading the controller keyword for hash [LEGACY]', function() { - ignoreAssertion(function() { - component = EmberComponent.extend({ - prop: true, - layout: compile('{{if true \'hiho\' option=controller.prop}}') - }).create(); - - runAppend(component); - }, /Using `{{controller}}` or any path based on it .*/); - ok(true, 'access keyword'); -}); - -QUnit.test('reading the controller keyword for param [LEGACY]', function() { - var text = 'a-prop'; - ignoreAssertion(function() { - component = EmberComponent.extend({ - prop: true, - layout: compile(`{{if controller.prop '${text}'}}`) - }).create(); - - runAppend(component); - }, /Using `{{controller}}` or any path based on it .*/); - equal(component.$().text(), text, 'controller keyword is read'); -}); - -QUnit.test('reading the controller keyword for param with block fails assertion [LEGACY]', function() { - ignoreAssertion(function() { - component = EmberComponent.extend({ - prop: true, - layout: compile(`{{#each controller as |things|}}{{/each}}`) - }).create(); - - runAppend(component); - }, /Using `{{controller}}` or any path based on it .*/); - ok(true, 'access keyword'); -}); - -} diff --git a/packages/ember-htmlbars/tests/helpers/view_test.js b/packages/ember-htmlbars/tests/helpers/view_test.js index b3b2741dc38..d601baff14d 100644 --- a/packages/ember-htmlbars/tests/helpers/view_test.js +++ b/packages/ember-htmlbars/tests/helpers/view_test.js @@ -366,19 +366,6 @@ QUnit.test('Should apply class without condition always', function() { ok(jQuery('#foo').hasClass('foo'), 'Always applies classbinding without condition'); }); -QUnit.test('Should apply classes when bound controller.* property specified', function() { - view = EmberView.create({ - controller: { - someProp: 'foo' - }, - template: compile('{{#view id="foo" class=controller.someProp}} Foo{{/view}}') - }); - - runAppend(view); - - ok(jQuery('#foo').hasClass('foo'), 'Always applies classbinding without condition'); -}); - QUnit.test('Should apply classes when bound property specified', function() { view = EmberView.create({ controller: { @@ -936,66 +923,6 @@ QUnit.test('a view helper\'s bindings are to the parent context', function() { equal(view.$('h1 .mauve').text(), 'foo bar', 'renders property bound in template from subview context'); }); -QUnit.test('should expose a controller keyword when present on the view', function() { - var templateString = '{{controller.foo}}{{#view}}{{controller.baz}}{{/view}}'; - view = EmberView.create({ - [OWNER]: owner, - controller: EmberObject.create({ - foo: 'bar', - baz: 'bang' - }), - - template: compile(templateString) - }); - - runAppend(view); - - equal(view.$().text(), 'barbang', 'renders values from controller and parent controller'); - - var controller = get(view, 'controller'); - - run(function() { - controller.set('foo', 'BAR'); - controller.set('baz', 'BLARGH'); - }); - - equal(view.$().text(), 'BARBLARGH', 'updates the DOM when a bound value is updated'); - - runDestroy(view); - - view = EmberView.create({ - controller: 'aString', - template: compile('{{controller}}') - }); - - runAppend(view); - - equal(view.$().text(), 'aString', 'renders the controller itself if no additional path is specified'); -}); - -QUnit.test('should expose a controller keyword that can be used in conditionals', function() { - var templateString = '{{#view}}{{#if controller}}{{controller.foo}}{{/if}}{{/view}}'; - view = EmberView.create({ - [OWNER]: owner, - - controller: EmberObject.create({ - foo: 'bar' - }), - - template: compile(templateString) - }); - - runAppend(view); - - equal(view.$().text(), 'bar', 'renders values from controller and parent controller'); - - run(function() { - view.set('controller', null); - }); - - equal(view.$().text(), '', 'updates the DOM when the controller is changed'); -}); - QUnit.test('should expose a controller that can be used in the view instance', function() { var templateString = '{{#view view.childThing tagName="div"}}Stuff{{/view}}'; var controller = { @@ -1077,7 +1004,7 @@ QUnit.test('bindings should respect keywords [DEPRECATED]', function() { template: compile('Name: {{view.attrs.name}} Price: ${{view.attrs.dollars}}') }), - template: compile('{{#if view.museumOpen}}{{view view.museumView name=controller.museumDetails.name dollars=controller.museumDetails.price}}{{/if}}') + template: compile('{{#if view.museumOpen}}{{view view.museumView name=museumDetails.name dollars=museumDetails.price}}{{/if}}') }); runAppend(view); @@ -1101,7 +1028,7 @@ QUnit.test('should respect keywords', function() { template: compile('Name: {{view.attrs.name}} Price: ${{view.attrs.dollars}}') }), - template: compile('{{#if view.museumOpen}}{{view view.museumView name=controller.museumDetails.name dollars=controller.museumDetails.price}}{{/if}}') + template: compile('{{#if view.museumOpen}}{{view view.museumView name=museumDetails.name dollars=museumDetails.price}}{{/if}}') }); runAppend(view); diff --git a/packages/ember-metal/tests/libraries_test.js b/packages/ember-metal/tests/libraries_test.js index f1d427e24b1..fda322e1169 100644 --- a/packages/ember-metal/tests/libraries_test.js +++ b/packages/ember-metal/tests/libraries_test.js @@ -4,6 +4,7 @@ import isEnabled from 'ember-metal/features'; import Libraries from 'ember-metal/libraries'; var libs, registry; +let originalWarn = getDebugFunction('warn'); QUnit.module('Libraries registry', { setup() { @@ -14,6 +15,8 @@ QUnit.module('Libraries registry', { teardown() { libs = null; registry = null; + + setDebugFunction('warn', originalWarn); } }); @@ -60,7 +63,6 @@ QUnit.test('attempting to register a library that is already registered warns yo expect(1); - let originalWarn = getDebugFunction('warn'); libs.register('magic', 1.23); @@ -72,8 +74,6 @@ QUnit.test('attempting to register a library that is already registered warns yo // Should warn us libs.register('magic', 2.23); - - setDebugFunction('warn', originalWarn); }); QUnit.test('libraries can be de-registered', function() { diff --git a/packages/ember-routing-htmlbars/lib/keywords/render.js b/packages/ember-routing-htmlbars/lib/keywords/render.js index 82c18f6f7de..8e957c519df 100644 --- a/packages/ember-routing-htmlbars/lib/keywords/render.js +++ b/packages/ember-routing-htmlbars/lib/keywords/render.js @@ -185,8 +185,7 @@ export default { controllerFullName = 'controller:' + controllerName; } - var parentController = read(scope.getLocal('controller')); - let target = parentController || router; + let target = router; var controller; // choose name @@ -196,7 +195,6 @@ export default { controller = factory.create({ model: read(context), - parentController, target }); @@ -206,8 +204,7 @@ export default { generateController(owner, controllerName); controller.setProperties({ - target, - parentController + target }); } diff --git a/packages/ember-routing-htmlbars/tests/helpers/element_action_test.js b/packages/ember-routing-htmlbars/tests/helpers/element_action_test.js index 04a4adf20ca..410914e6dce 100644 --- a/packages/ember-routing-htmlbars/tests/helpers/element_action_test.js +++ b/packages/ember-routing-htmlbars/tests/helpers/element_action_test.js @@ -742,30 +742,6 @@ QUnit.test('should unwrap controllers passed as a context', function() { equal(passedContext, model, 'the action was passed the unwrapped model'); }); -QUnit.test('should not unwrap controllers passed as `controller`', function() { - var passedContext; - var model = EmberObject.create(); - var controller = EmberController.extend({ - model: model, - actions: { - edit(context) { - passedContext = context; - } - } - }).create(); - - view = EmberView.create({ - controller: controller, - template: compile('') - }); - - runAppend(view); - - view.$('button').trigger('click'); - - equal(passedContext, controller, 'the action was passed the controller'); -}); - QUnit.test('should allow multiple contexts to be specified', function() { var passedContexts; var models = [EmberObject.create(), EmberObject.create()]; @@ -1203,9 +1179,6 @@ QUnit.module('ember-routing-htmlbars: action helper - action target without `con dispatcher = owner.lookup('event_dispatcher:main'); dispatcher.setup(); - this.originalLegacyControllerSupport = Ember.ENV._ENABLE_LEGACY_CONTROLLER_SUPPORT; - Ember.ENV._ENABLE_LEGACY_CONTROLLER_SUPPORT = false; - this.originalLegacyViewSupport = Ember.ENV._ENABLE_LEGACY_VIEW_SUPPORT; Ember.ENV._ENABLE_LEGACY_VIEW_SUPPORT = false; }, @@ -1215,7 +1188,6 @@ QUnit.module('ember-routing-htmlbars: action helper - action target without `con runDestroy(dispatcher); runDestroy(owner); - Ember.ENV._ENABLE_LEGACY_CONTROLLER_SUPPORT = this.originalLegacyControllerSupport; Ember.ENV._ENABLE_LEGACY_VIEW_SUPPORT = this.originalLegacyViewSupport; } }); diff --git a/packages/ember-routing-htmlbars/tests/helpers/outlet_test.js b/packages/ember-routing-htmlbars/tests/helpers/outlet_test.js index 87c8f7371ef..0b1ef4913de 100644 --- a/packages/ember-routing-htmlbars/tests/helpers/outlet_test.js +++ b/packages/ember-routing-htmlbars/tests/helpers/outlet_test.js @@ -58,33 +58,6 @@ QUnit.test('a top-level outlet should always be a view', function() { equal(trim(top.$('#top-level').text()), 'HIBYE'); }); -QUnit.test('a top-level outlet should have access to `{{controller}}`', function() { - var routerState = withTemplate('

{{controller.salutation}}

{{outlet}}'); - routerState.render.controller = Controller.create({ - salutation: 'HI' - }); - top.setOutletState(routerState); - routerState.outlets.main = withTemplate('

BYE

'); - runAppend(top); - - // Replace whitespace for older IE - equal(trim(top.$().text()), 'HIBYE'); -}); - -QUnit.test('a non top-level outlet should have access to `{{controller}}`', function() { - var routerState = withTemplate('

HI

{{outlet}}'); - top.setOutletState(routerState); - routerState.outlets.main = withTemplate('

BYE

'); - routerState.outlets.main.render.controller = Controller.create({ - salutation: 'BYE' - }); - - runAppend(top); - - // Replace whitespace for older IE - equal(trim(top.$().text()), 'HIBYE'); -}); - QUnit.test('view should render the outlet when set before dom insertion', function() { var routerState = withTemplate('

HI

{{outlet}}'); routerState.outlets.main = withTemplate('

BYE

'); diff --git a/packages/ember-routing-htmlbars/tests/helpers/render_test.js b/packages/ember-routing-htmlbars/tests/helpers/render_test.js index 571a37d44b2..624cd1b5393 100644 --- a/packages/ember-routing-htmlbars/tests/helpers/render_test.js +++ b/packages/ember-routing-htmlbars/tests/helpers/render_test.js @@ -2,14 +2,9 @@ import Ember from 'ember-metal/core'; // TEMPLATES import { set } from 'ember-metal/property_set'; import run from 'ember-metal/run_loop'; import { observer } from 'ember-metal/mixin'; - import EmberController from 'ember-runtime/controllers/controller'; - import compile from 'ember-template-compiler/system/compile'; - import EmberView from 'ember-views/views/view'; -import jQuery from 'ember-views/system/jquery'; -import ActionManager from 'ember-views/system/action_manager'; import { buildAppInstance } from 'ember-routing-htmlbars/tests/utils'; import { runAppend, runDestroy } from 'ember-runtime/tests/utils'; @@ -490,45 +485,6 @@ QUnit.test('{{render}} helper should render templates both with and without mode deepEqual(postController2.get('model'), { title: 'Rails is unagi' }); }); -QUnit.test('{{render}} helper should link child controllers to the parent controller', function() { - let parentTriggered = 0; - let template = '

HI

{{render "posts"}}'; - let Controller = EmberController.extend({ - actions: { - parentPlease() { - parentTriggered++; - } - }, - role: 'Mom' - }); - let controller = Controller.create({ - [OWNER]: appInstance - }); - - appInstance.register('controller:posts', EmberController.extend()); - - view = EmberView.create({ - [OWNER]: appInstance, - controller, - template: compile(template) - }); - - Ember.TEMPLATES['posts'] = compile(''); - - runAppend(view); - - var button = jQuery('#parent-action'); - var actionId = button.data('ember-action'); - var [ action ] = ActionManager.registeredActions[actionId]; - var handler = action.handler; - - equal(button.text(), 'Go to Mom', 'The parentController property is set on the child controller'); - - run(null, handler, new jQuery.Event('click')); - - equal(parentTriggered, 1, 'The event bubbled to the parent'); -}); - QUnit.test('{{render}} helper should be able to render a template again when it was removed', function() { let CoreOutlet = appInstance._lookupFactory('view:core-outlet'); let Controller = EmberController.extend(); diff --git a/packages/ember-template-compiler/lib/plugins/assert-no-view-and-controller-paths.js b/packages/ember-template-compiler/lib/plugins/assert-no-view-and-controller-paths.js index 3f5dd99791e..9ab98a10077 100644 --- a/packages/ember-template-compiler/lib/plugins/assert-no-view-and-controller-paths.js +++ b/packages/ember-template-compiler/lib/plugins/assert-no-view-and-controller-paths.js @@ -56,11 +56,10 @@ function assertPath(moduleName, node, path) { `Using \`{{${path && path.type === 'PathExpression' && path.parts[0]}}}\` or any path based on it ${calculateLocationDisplay(moduleName, node.loc)}has been removed in Ember 2.0`, () => { let noAssertion = true; + // allow opt-out of the assertion when legacy addons are present let viewKeyword = path && path.type === 'PathExpression' && path.parts && path.parts[0]; if (viewKeyword === 'view') { noAssertion = Ember.ENV._ENABLE_LEGACY_VIEW_SUPPORT; - } else if (viewKeyword === 'controller') { - noAssertion = Ember.ENV._ENABLE_LEGACY_CONTROLLER_SUPPORT; } return noAssertion; diff --git a/tests/index.html b/tests/index.html index 765367bef8d..58d443fcb58 100644 --- a/tests/index.html +++ b/tests/index.html @@ -41,8 +41,7 @@ testing: true }; window.ENV = window.ENV || { - _ENABLE_LEGACY_VIEW_SUPPORT: true, - _ENABLE_LEGACY_CONTROLLER_SUPPORT: true + _ENABLE_LEGACY_VIEW_SUPPORT: true }; window.printTestCounts = function() {