Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit a3fbf0f

Browse files
committed
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.
1 parent f2894c0 commit a3fbf0f

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

test/ng/parseSpec.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,9 @@ describe('parser', function() {
202202

203203

204204
forEach([true, false], function(cspEnabled) {
205+
forEach([true, false], function(unwrapPromisesEnabled) {
205206

206-
describe('csp: ' + cspEnabled, function() {
207+
describe('csp: ' + cspEnabled + ", unwrapPromises: " + unwrapPromisesEnabled, function() {
207208

208209
beforeEach(module(function($provide) {
209210
$provide.decorator('$sniffer', function($delegate) {
@@ -213,15 +214,6 @@ describe('parser', function() {
213214
}, provideLog));
214215

215216

216-
beforeEach(function() {
217-
originalSecurityPolicy = window.document.securityPolicy;
218-
window.document.securityPolicy = {isActive : cspEnabled};
219-
});
220-
221-
afterEach(function() {
222-
window.document.securityPolicy = originalSecurityPolicy;
223-
});
224-
225217
beforeEach(module(function ($parseProvider, $provide) {
226218
$parseProvider.unwrapPromises(unwrapPromisesEnabled);
227219
}));

0 commit comments

Comments
 (0)