From da2d4549682ea19bd347147275e0c038245f9d8a Mon Sep 17 00:00:00 2001 From: Lucas Gelfond Date: Mon, 23 Dec 2024 17:42:40 -0800 Subject: [PATCH] fix missing APIs for multithreaded tests in GH actions --- .github/workflows/CI.yml | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 77406ad7e1..5b7c7229c0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -97,24 +97,39 @@ jobs: env: CHROME_HEADLESS: 1 CHROME_PATH: chrome - CHROME_FLAGS: "--enable-features=SharedArrayBuffer --headless --disable-gpu --no-sandbox --enable-experimental-web-platform-features --enable-features=SharedArrayBuffer" - HEADERS: '{"Cross-Origin-Opener-Policy": "same-origin", "Cross-Origin-Embedder-Policy": "require-corp", "Cross-Origin-Resource-Policy": "cross-origin", "Origin-Agent-Cluster": "?1"}' + CHROME_FLAGS: "--headless --disable-gpu --no-sandbox --enable-features=SharedArrayBuffer,CrossOriginIsolation" + HEADERS: '{"Cross-Origin-Opener-Policy": "same-origin", "Cross-Origin-Embedder-Policy": "require-corp"}' run: | # Start test server with proper headers for all tests npm run serve & - # Wait for server to start and ensure headers are properly set - sleep 10 + # Increase wait time to ensure server is ready + sleep 15 - # Verify headers are set correctly - echo "Checking security headers..." - curl -I http://localhost:3000/tests/ffmpeg-core-st.test.html + # Verify headers and isolation status + echo "Checking security headers and isolation status..." + curl -v http://localhost:3000/tests/ffmpeg-core-st.test.html 2>&1 | grep -i "cross-origin" - # Check if cross-origin isolation is working - echo "Adding debug script to test files to check crossOriginIsolated status..." - for test_file in tests/ffmpeg-*.test.html; do - sed -i '/<\/head>/ i\' $test_file - done + # Run verification script first + echo "Verifying browser environment..." + cat << EOF > verify-browser.html + + + + + + + + + + + EOF # Run single-threaded tests first echo "Running single-threaded tests..."