Skip to content

Commit

Permalink
Revert "FSA: Fix more manual WPTs"
Browse files Browse the repository at this point in the history
This reverts commit fe27a7828eb3902d1b12c05fd97d4e7e13c8554b.

Reason for revert: Suspect of causing test failures:
https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Tests/148853/

Original change's description:
> FSA: Fix more manual WPTs
>
> Two tests were using await in a non-async function. And a test helper
> was using newAnonymousIframe which was updated at some point to
> newIframeCredentialless.
>
> Bug: 346991169
> Change-Id: I4333b6abee03ed48cf0d10d3417a2c15fba06d30
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5906718
> Commit-Queue: Nathan Memmott <memmott@chromium.org>
> Reviewed-by: Ayu Ishii <ayui@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1363384}

Bug: 346991169
Change-Id: Ie3a3b3fea9a3a2f3a735e082c30e74e3be59c3f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5906899
Auto-Submit: Luciano Pacheco <lucmult@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Luciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1363433}
  • Loading branch information
Luciano Pacheco authored and chromium-wpt-export-bot committed Oct 3, 2024
1 parent d22edce commit 1da52c0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

// To be resilient against tests not cleaning up properly, cleanup before
// every test.
async function clearDirectories() {
function clearDirectories() {
const directory = await directory_promise;
for await (let entry of directory.values()) {
await directory.removeEntry(
Expand All @@ -72,7 +72,7 @@
// that send assertion scripts to multiple executor subframes.

framed_test(async (t, sendTo) => {
await clearDirectories();
clearDirectories();
// Ensure we have directory picker access in all child contexts.
await sendTo(childContexts, setUpChildFrame);
await sendTo(sameSiteContexts, assertNumEntries(0));
Expand All @@ -85,7 +85,7 @@
}, 'getDirectoryHandle can access handles across same-site contexts.');

framed_test(async (t, sendTo) => {
await clearDirectories();
clearDirectories();
// Ensure we have directory picker access in all child contexts.
await sendTo(childContexts, setUpChildFrame);
await sendTo(sameSiteContexts, assertNumEntries(0));
Expand All @@ -101,7 +101,7 @@
}, 'Directory handles can be removed from other same-site contexts.');

framed_test(async (t, sendTo) => {
await clearDirectories();
clearDirectories();
// Ensure we have directory picker access in all child contexts.
await sendTo(childContexts, setUpChildFrame);
// Assert that an error is raised when attempting to access
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

// To be resilient against tests not cleaning up properly, cleanup before
// every test.
async function clearDirectories() {
function clearDirectories() {
const directory = await directory_promise;
for await (let entry of directory.values()) {
await directory.removeEntry(
Expand All @@ -82,7 +82,7 @@
// that send assertion scripts to multiple executor subframes.

framed_test(async (t, sendTo) => {
await clearDirectories();
clearDirectories();
// Ensure we have directory picker access in all child contexts.
await sendTo(childContexts, setUpChildFrame);
await sendTo(sameSiteContexts, assertNumEntries(0));
Expand All @@ -95,7 +95,7 @@
}, 'getFileHandle can access handles across same-site contexts.');

framed_test(async (t, sendTo) => {
await clearDirectories();
clearDirectories();
// Ensure we have directory picker access in all child frames.
await sendTo(childContexts, setUpChildFrame);
await sendTo(sameSiteContexts, assertNumEntries(0));
Expand All @@ -111,7 +111,7 @@
}, 'File handles can be removed from other same-site contexts.');

framed_test(async (t, sendTo) => {
await clearDirectories();
clearDirectories();
// Ensure we have directory picker access in all child contexts.
await sendTo(childContexts, setUpChildFrame);
// Assert that an error is raised when attempting to access getFileHandle.
Expand Down
17 changes: 7 additions & 10 deletions file-system-access/resources/local-fs-test-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,25 +151,22 @@ function framed_test(func, description) {
try {
// Set up handles to all third party frames.
const handles = [
null, // firstParty
newIframe(same_site_origin), // thirdPartySameSite
null, // thirdPartySameSite_AncestorBit
null, // firstParty
newIframe(same_site_origin), // thirdPartySameSite
null, // thirdPartySameSite_AncestorBit
newIframe(cross_site_origin), // thirdPartyCrossSite
newIframeCredentialless(same_site_origin), // anonymousFrameSameSite
newAnonymousIframe(same_site_origin), // anonymousFrameSameSite
null, // anonymousFrameSameSite_AncestorBit
newIframeCredentialless(
cross_site_origin), // anonymousFrameCrossSite
newAnonymousIframe(cross_site_origin), // anonymousFrameCrossSite
];
// Set up nested SameSite frames for ancestor bit contexts.
const setUpQueue = token();
send(newIframe(cross_site_origin),
child_frame_js(same_site_origin, "newIframe", setUpQueue));
handles[FRAME_CONTEXT.thirdPartySameSite_AncestorBit] =
await receive(setUpQueue);
send(
newIframeCredentialless(cross_site_origin),
child_frame_js(
same_site_origin, 'newIframeCredentialless', setUpQueue));
send(newAnonymousIframe(cross_site_origin),
child_frame_js(same_site_origin, "newAnonymousIframe", setUpQueue));
handles[FRAME_CONTEXT.anonymousFrameSameSite_AncestorBit] =
await receive(setUpQueue);

Expand Down

0 comments on commit 1da52c0

Please sign in to comment.