From bf2dbe0a68956e1360544ae7cd3d013648bbf05e Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Tue, 11 Apr 2017 18:38:43 -0700 Subject: [PATCH] Ensure prototype wasn't affected by runtime effects. --- test/unit/property-effects.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/unit/property-effects.html b/test/unit/property-effects.html index 3de0bfb660..d42d1704e5 100644 --- a/test/unit/property-effects.html +++ b/test/unit/property-effects.html @@ -1402,7 +1402,7 @@ suite('runtime effects', function() { - var el; + var el, el2; setup(function() { el = document.createElement('x-basic'); @@ -1411,6 +1411,7 @@ teardown(function() { document.body.removeChild(el); + document.body.removeChild(el2); }); test('add/remove runtime property effect', function() { @@ -1429,6 +1430,10 @@ el._removePropertyEffect('value', el.PROPERTY_EFFECT_TYPES.OBSERVE, effect); el.value = 'value+++'; assert.equal(fn.callCount, 1); + // Ensure prototype wasn't affected + el2 = document.createElement('x-basic'); + document.body.appendChild(el2); + assert.equal(fn.callCount, 1); }); test('add/remove runtime path effect', function() { @@ -1455,6 +1460,10 @@ el._removePropertyEffect('value', el.PROPERTY_EFFECT_TYPES.OBSERVE, effect); el.set('value.path', 'value.path+++'); assert.equal(fn.callCount, 2); + // Ensure prototype wasn't affected + el2 = document.createElement('x-basic'); + document.body.appendChild(el2); + assert.equal(fn.callCount, 2); }); });