From a3fbf0ff5af3fb8a588d7f515bd0a9d66dece3a6 Mon Sep 17 00:00:00 2001 From: Caitlin Potter Date: Fri, 12 Sep 2014 15:05:50 -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 | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/test/ng/parseSpec.js b/test/ng/parseSpec.js index 7a3770cc..3fcf7156 100644 --- a/test/ng/parseSpec.js +++ b/test/ng/parseSpec.js @@ -202,8 +202,9 @@ describe('parser', function() { forEach([true, false], function(cspEnabled) { + forEach([true, false], function(unwrapPromisesEnabled) { - describe('csp: ' + cspEnabled, function() { + describe('csp: ' + cspEnabled + ", unwrapPromises: " + unwrapPromisesEnabled, function() { beforeEach(module(function($provide) { $provide.decorator('$sniffer', function($delegate) { @@ -213,15 +214,6 @@ describe('parser', function() { }, provideLog)); - beforeEach(function() { - originalSecurityPolicy = window.document.securityPolicy; - window.document.securityPolicy = {isActive : cspEnabled}; - }); - - afterEach(function() { - window.document.securityPolicy = originalSecurityPolicy; - }); - beforeEach(module(function ($parseProvider, $provide) { $parseProvider.unwrapPromises(unwrapPromisesEnabled); }));