Skip to content

Commit c0dfa80

Browse files
pfaffeDevtools-frontend LUCI CQ
authored andcommitted
Update a trusted types test to unblock a CfT roll
The severity of report-only CSP messages was changed in https://crrev.com/c/5956989. Following CfT rolls are blocked by this, so update the test to cause a non-report-only failure. Bug: none Change-Id: I585128118a41180d0248a5e049c204debcec2d34 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6037627 Auto-Submit: Philip Pfaffe <[email protected]> Commit-Queue: Alex Rudenko <[email protected]> Reviewed-by: Alex Rudenko <[email protected]>
1 parent 4d2261c commit c0dfa80

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

test/e2e/helpers/sources-helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export async function doubleClickSourceTreeItem(selector: string) {
9393

9494
export async function waitForSourcesPanel(): Promise<void> {
9595
// Wait for the navigation panel to show up
96-
await Promise.any([waitFor('.navigator-file-tree-item'), waitFor('.empty-view')]);
96+
await waitFor('.navigator-file-tree-item, .empty-view');
9797
}
9898

9999
export async function openSourcesPanel() {

test/e2e/sources/icon-row-bucket_test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,13 @@ describe('The row\'s icon bucket', function() {
8989
// can be changed to check the elements one by one using the safer hover/click helpers.
9090
// Or perhaps the tests only ever check a single element and the list checks are not needed at all.
9191
it('should display error messages', async () => {
92-
await openFileInSourceTab('trusted-type-policy-violation-report-only.rawresponse');
92+
await openFileInSourceTab('trusted-type-violations-enforced.rawresponse');
9393
const iconComponents = await getIconComponents('cm-messageIcon-error');
9494
const messages: string[] = [];
9595
const expectedMessages = [
96-
'[Report Only] Refused to create a TrustedTypePolicy named \'policy2\' because it violates the following Content Security Policy directive: "trusted-types policy1".',
96+
'Refused to create a TrustedTypePolicy named \'policy2\' because it violates the following Content Security Policy directive: "trusted-types policy1".',
97+
'Uncaught TypeError: Failed to execute \'createPolicy\' on \'TrustedTypePolicyFactory\': Policy "policy2" disallowed.',
98+
9799
];
98100
for (const iconComponent of iconComponents) {
99101
await hoverElement(iconComponent);

0 commit comments

Comments
 (0)