mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
test(core): remove obsolete SVG script sanitization translation test
Some checks are pending
DevInfra / assistant_to_the_branch_manager (push) Waiting to run
CI (push) / lint (push) Waiting to run
CI (push) / devtools (push) Waiting to run
CI (push) / test (push) Waiting to run
CI (push) / integration-tests (push) Waiting to run
CI (push) / adev (push) Waiting to run
CI (push) / vscode-ng-language-service (push) Waiting to run
CI (push) / publish-snapshots (push) Waiting to run
CI (push) / zone-js (push) Waiting to run
CI (push) / adev-deploy (push) Blocked by required conditions
Update ADEV Cross Repo Docs / Update Cross Repo ADEV Docs (push) Waiting to run
Some checks are pending
DevInfra / assistant_to_the_branch_manager (push) Waiting to run
CI (push) / lint (push) Waiting to run
CI (push) / devtools (push) Waiting to run
CI (push) / test (push) Waiting to run
CI (push) / integration-tests (push) Waiting to run
CI (push) / adev (push) Waiting to run
CI (push) / vscode-ng-language-service (push) Waiting to run
CI (push) / publish-snapshots (push) Waiting to run
CI (push) / zone-js (push) Waiting to run
CI (push) / adev-deploy (push) Blocked by required conditions
Update ADEV Cross Repo Docs / Update Cross Repo ADEV Docs (push) Waiting to run
Removes the `should throw error on translated SVG script ResourceURL
attributes` integration test from `security_integration_spec.ts`.
This test is now obsolete because SVG `<script>` elements are stripped during
template compilation (implemented in 90494cd909). As a result, they are no
longer present in the compiled template to trigger runtime sanitization,
causing this test (which expected a sanitization error to be thrown) to fail.
This commit is contained in:
parent
bfe6f6c2a5
commit
5993c47a86
1 changed files with 0 additions and 13 deletions
|
|
@ -288,19 +288,6 @@ describe('security integration tests', function () {
|
|||
clearTranslations();
|
||||
});
|
||||
|
||||
it('should throw error on translated SVG script ResourceURL attributes', () => {
|
||||
const template = `
|
||||
<svg>
|
||||
<script href="/safe-svg-script.js" i18n-href></script>
|
||||
</svg>
|
||||
`;
|
||||
TestBed.overrideComponent(SecuredComponent, {set: {template}});
|
||||
|
||||
expect(() => TestBed.createComponent(SecuredComponent)).toThrowError(
|
||||
/unsafe value used in a resource URL context/i,
|
||||
);
|
||||
});
|
||||
|
||||
it('should throw error on SVG animation retargeting attributes', () => {
|
||||
const template = `
|
||||
<svg>
|
||||
|
|
|
|||
Loading…
Reference in a new issue