Don't run permissions iframe tests concurrently with top-level tests
This also marks the test as flaky.
Bug: 1411486
Change-Id: Ife3665e2e7985bf6951e8be8b185eaaeb4a90a98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4208689
Reviewed-by: Johann Hofmann <johannhof@chromium.org>
Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1103865}
diff --git a/storage-access-api/helpers.js b/storage-access-api/helpers.js
index e607124..b0f8866 100644
--- a/storage-access-api/helpers.js
+++ b/storage-access-api/helpers.js
@@ -11,7 +11,7 @@
// Create an iframe element, set it up using `setUpFrame`, and optionally fetch
// tests in it. Returns the created frame, after it has loaded.
-function CreateFrameHelper(setUpFrame, fetchTests) {
+async function CreateFrameHelper(setUpFrame, fetchTests) {
const frame = document.createElement('iframe');
const promise = new Promise((resolve, reject) => {
frame.onload = () => resolve(frame);
@@ -21,7 +21,7 @@
setUpFrame(frame);
if (fetchTests) {
- fetch_tests_from_window(frame.contentWindow);
+ await fetch_tests_from_window(frame.contentWindow);
}
return promise;
}
diff --git a/storage-access-api/storage-access-permission.sub.https.window.js b/storage-access-api/storage-access-permission.sub.https.window.js
index 88473ce..d1ee770 100644
--- a/storage-access-api/storage-access-permission.sub.https.window.js
+++ b/storage-access-api/storage-access-permission.sub.https.window.js
@@ -27,8 +27,10 @@
assert_equals(state, "granted");
}, "Permissions grants are observable across same-origin iframes");
- // Finally run the simple tests below in a separate cross-origin iframe.
- RunTestsInIFrame('https://{{domains[www]}}:{{ports[https][0]}}/storage-access-api/resources/permissions-iframe.https.html');
+ promise_test(async (t) => {
+ // Finally run the simple tests below in a separate cross-origin iframe.
+ await RunTestsInIFrame('https://{{domains[www]}}:{{ports[https][0]}}/storage-access-api/resources/permissions-iframe.https.html');
+ }, "IFrame tests");
return;
}