@@ -97,24 +97,39 @@ jobs:
97
97
env :
98
98
CHROME_HEADLESS : 1
99
99
CHROME_PATH : chrome
100
- CHROME_FLAGS : " --enable-features=SharedArrayBuffer -- headless --disable-gpu --no-sandbox --enable-experimental-web-platform- features --enable-features =SharedArrayBuffer"
101
- HEADERS : ' {"Cross-Origin-Opener-Policy": "same-origin", "Cross-Origin-Embedder-Policy": "require-corp", "Cross-Origin-Resource-Policy": "cross-origin", "Origin-Agent-Cluster": "?1" }'
100
+ CHROME_FLAGS : " --headless --disable-gpu --no-sandbox --enable-features=SharedArrayBuffer,CrossOriginIsolation "
101
+ HEADERS : ' {"Cross-Origin-Opener-Policy": "same-origin", "Cross-Origin-Embedder-Policy": "require-corp"}'
102
102
run : |
103
103
# Start test server with proper headers for all tests
104
104
npm run serve &
105
105
106
- # Wait for server to start and ensure headers are properly set
107
- sleep 10
106
+ # Increase wait time to ensure server is ready
107
+ sleep 15
108
108
109
- # Verify headers are set correctly
110
- echo "Checking security headers..."
111
- curl -I http://localhost:3000/tests/ffmpeg-core-st.test.html
109
+ # Verify headers and isolation status
110
+ echo "Checking security headers and isolation status ..."
111
+ curl -v http://localhost:3000/tests/ffmpeg-core-st.test.html 2>&1 | grep -i "cross-origin"
112
112
113
- # Check if cross-origin isolation is working
114
- echo "Adding debug script to test files to check crossOriginIsolated status..."
115
- for test_file in tests/ffmpeg-*.test.html; do
116
- sed -i '/<\/head>/ i\<script>console.log("crossOriginIsolated status:", crossOriginIsolated);</script>' $test_file
117
- done
113
+ # Run verification script first
114
+ echo "Verifying browser environment..."
115
+ cat << EOF > verify-browser.html
116
+ <!DOCTYPE html>
117
+ <html>
118
+ <head>
119
+ <meta http-equiv="Cross-Origin-Opener-Policy" content="same-origin">
120
+ <meta http-equiv="Cross-Origin-Embedder-Policy" content="require-corp">
121
+ </head>
122
+ <body>
123
+ <script>
124
+ console.log('SharedArrayBuffer available:', typeof SharedArrayBuffer !== 'undefined');
125
+ console.log('crossOriginIsolated:', window.crossOriginIsolated);
126
+ if (!window.crossOriginIsolated || typeof SharedArrayBuffer === 'undefined') {
127
+ throw new Error('Browser environment not properly configured for SharedArrayBuffer');
128
+ }
129
+ </script>
130
+ </body>
131
+ </html>
132
+ EOF
118
133
119
134
# Run single-threaded tests first
120
135
echo "Running single-threaded tests..."
0 commit comments