diff --git a/lib/legacy/class.html b/lib/legacy/class.html index dd7a7cbce9..873b76c5e3 100644 --- a/lib/legacy/class.html +++ b/lib/legacy/class.html @@ -62,7 +62,6 @@ if (superBehaviors) { behaviors = superBehaviors.concat(behaviors); } - klass.behaviors = behaviors; klass.prototype.behaviors = behaviors; return klass; } diff --git a/test/unit/mixin-behaviors.html b/test/unit/mixin-behaviors.html index 7b82641a09..caa7fee702 100644 --- a/test/unit/mixin-behaviors.html +++ b/test/unit/mixin-behaviors.html @@ -284,7 +284,7 @@ this._createMethodObserver('propChanged2(prop)'); this.registeredCount++; this.registeredProps = [this.prop1, this.prop2, this.prop3]; - this.registeredBehaviors = this.constructor.behaviors; + this.registeredBehaviors = this.behaviors; }, prop1: true, ready: function() { @@ -383,8 +383,7 @@ }); test('instance and class behaviors', function() { - assert.equal(el.constructor.behaviors.length, 1); - assert.deepEqual(el.behaviors, el.constructor.behaviors); + assert.equal(el.behaviors.length, 1); }); test('listener from behavior', function() { @@ -418,7 +417,7 @@ var el = fixture('registered'); assert.equal(el.registeredCount, 4); assert.equal(el.registeredBehaviors.length, 3); - assert.equal(el.registeredBehaviors, el.constructor.behaviors); + assert.equal(el.registeredBehaviors, el.behaviors); assert.deepEqual(el.registeredProps, [true, true, true]); }); @@ -453,8 +452,7 @@ }); test('instance and class behaviors', function() { - assert.equal(el.constructor.behaviors.length, 2); - assert.deepEqual(el.behaviors, el.constructor.behaviors); + assert.equal(el.behaviors.length, 2); }); test('properties from behaviors', function() { @@ -520,13 +518,13 @@ test('behavior array is unique', function() { customElements.define('behavior-unique', Polymer.mixinBehaviors( [Polymer.BehaviorA, Polymer.BehaviorA], Polymer.Element)); - assert.equal(document.createElement('behavior-unique').constructor.behaviors.length, 1); + assert.equal(document.createElement('behavior-unique').behaviors.length, 1); }); test('duplicate behaviors keep first behavior', function() { customElements.define('behavior-unique-last-behavior', Polymer.mixinBehaviors( [Polymer.BehaviorA, Polymer.BehaviorB, Polymer.BehaviorC, Polymer.BehaviorA, Polymer.BehaviorB], Polymer.Element)); - var behaviors = document.createElement('behavior-unique-last-behavior').constructor.behaviors; + var behaviors = document.createElement('behavior-unique-last-behavior').behaviors; assert.deepEqual(behaviors, [Polymer.BehaviorC, Polymer.BehaviorA, Polymer.BehaviorB]); }); @@ -540,7 +538,7 @@ }); test('nested-behavior dedups', function() { - assert.equal(el.constructor.behaviors.length, 4); + assert.equal(el.behaviors.length, 4); }); test('nested-behavior overrides ordering', function() {