diff --git a/src/lib/bind/accessors.html b/src/lib/bind/accessors.html index 99739813..16604b30 100644 --- a/src/lib/bind/accessors.html +++ b/src/lib/bind/accessors.html @@ -143,7 +143,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN var EFFECT_ORDER = { 'compute': 0, 'annotation': 1, - 'computedAnnotation': 2, + 'annotatedComputation': 2, 'reflect': 3, 'notify': 4, 'observer': 5, diff --git a/test/unit/bind-elements.html b/test/unit/bind-elements.html index 4ab6265d..851c6d4a 100644 --- a/test/unit/bind-elements.html +++ b/test/unit/bind-elements.html @@ -492,3 +492,93 @@ }); + + + + + + + + + diff --git a/test/unit/bind.html b/test/unit/bind.html index dd0cb055..1bd95331 100644 --- a/test/unit/bind.html +++ b/test/unit/bind.html @@ -859,6 +859,32 @@ suite('compound binding / string interpolation', function() { }); +suite('order of effects', function() { + + var el; + + setup(function() { + el = document.createElement('x-order-of-effects-grand-parent').$.child; + }); + + test('effects are sorted', function() { + assert.equal(el.invocations.length, 0); + el.base = 'changed'; + + var expected = [ + 'compute', + 'annotation', // as observed by child + 'annotatedComputation', // as observed by child + 'reflect', + 'notify', // as observed by grand-parent + 'observer', + 'complexObserver' + ]; + + assert.deepEqual(el.invocations, expected); + }); +}); +