Skip to content

Commit

Permalink
[WPT] [CSP] Fix flaky slow CSPEE test
Browse files Browse the repository at this point in the history
The flaky test
external/wpt/content-security-policy/embedded-enforcement/subsumption_algorithm-unsafe_inline.html
might just be slow. Let's split it in two parts according to
https://web-platform-tests.org/writing-tests/testharness.html#variants
and see if it helps.

Bug: 1401719
Change-Id: I2bdbeae65fdaa95f361b9771a470f04533590601
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5034539
Commit-Queue: Antonio Sartori <antoniosartori@chromium.org>
Reviewed-by: Jonathan Hao <phao@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1225386}
  • Loading branch information
antosart authored and Chromium LUCI CQ committed Nov 16, 2023
1 parent 0004396 commit bd57d55
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
<html>
<head>
<title>Embedded Enforcement: Subsumption Algorithm - 'unsafe-inline' keyword.</title>
<meta name="variant" content="?1-8">
<meta name="variant" content="?9-last">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/testharness-helper.sub.js"></script>
<script src="/common/subset-tests.js"></script>
</head>
<body>
<script>
Expand Down Expand Up @@ -91,7 +94,7 @@
"expected": IframeLoad.EXPECT_LOAD },
];
tests.forEach(test => {
async_test(t => {
subsetTest(async_test, t => {
var url = generateUrlWithPolicies(Host.CROSS_ORIGIN, test.returned_csp_1);
if (test.returned_csp_2)
url.searchParams.append("policy2", test.returned_csp_2);
Expand Down

0 comments on commit bd57d55

Please sign in to comment.