From f2894c0f1da27c971290754db958417fab1ae15d Mon Sep 17 00:00:00 2001 From: Caitlin Potter Date: Fri, 12 Sep 2014 08:25:41 -0400 Subject: [PATCH] test($parse): ensure CSP code paths are used when testing Previously, the test suite was not actually taking CSP-mode paths when we were expecting it to. Numerous CSP-mode tests are failing, working on fixing these. --- test/ng/parseSpec.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/ng/parseSpec.js b/test/ng/parseSpec.js index 6e827d98a..7a3770cc6 100644 --- a/test/ng/parseSpec.js +++ b/test/ng/parseSpec.js @@ -202,11 +202,15 @@ describe('parser', function() { forEach([true, false], function(cspEnabled) { - forEach([true, false], function(unwrapPromisesEnabled) { - describe('csp: ' + cspEnabled + ", unwrapPromises: " + unwrapPromisesEnabled, function() { + describe('csp: ' + cspEnabled, function() { - var originalSecurityPolicy; + beforeEach(module(function($provide) { + $provide.decorator('$sniffer', function($delegate) { + $delegate.csp = cspEnabled; + return $delegate; + }); + }, provideLog)); beforeEach(function() {