Skip to content

Commit f47fc87

Browse files
committed
Test that JSPI works in chrome browser tests.
1 parent 058fa51 commit f47fc87

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ commands:
329329
# this flag for now: https://crbug.com/638180
330330
CHROME_FLAGS_BASE: "--no-first-run -start-maximized --no-sandbox --use-gl=swiftshader --user-data-dir=/tmp/chrome-emscripten-profile --enable-experimental-web-platform-features"
331331
CHROME_FLAGS_HEADLESS: "--headless --remote-debugging-port=1234"
332-
CHROME_FLAGS_WASM: "--enable-experimental-webassembly-features --js-flags=\"--experimental-wasm-memory64\""
332+
CHROME_FLAGS_WASM: "--enable-experimental-webassembly-features --js-flags=\"--experimental-wasm-memory64 --experimental-wasm-stack-switching --experimental-wasm-type-reflection\""
333333
CHROME_FLAGS_NOCACHE: "--disk-cache-dir=/dev/null --disk-cache-size=1 --media-cache-size=1 --disable-application-cache --incognito"
334334
command: |
335335
export EMTEST_BROWSER="/usr/bin/google-chrome $CHROME_FLAGS_BASE $CHROME_FLAGS_HEADLESS $CHROME_FLAGS_WASM $CHROME_FLAGS_NOCACHE"

test/test_browser.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3320,10 +3320,17 @@ def test_cocos2d_hello(self):
33203320
'-Wno-inconsistent-missing-override',
33213321
'-Wno-deprecated-declarations'])
33223322

3323-
def test_async(self):
3323+
@parameterized({
3324+
'asyncify': (['-sASYNCIFY=1'],),
3325+
'jspi': (['-sASYNCIFY=2', '-Wno-experimental'],),
3326+
})
3327+
def test_async(self, args):
3328+
if '-sASYNCIFY=2' in args and not is_chrome():
3329+
self.skipTest('only chrome supports jspi')
3330+
33243331
for opts in [0, 1, 2, 3]:
33253332
print(opts)
3326-
self.btest_exit('browser/async.cpp', args=['-O' + str(opts), '-g2', '-sASYNCIFY'])
3333+
self.btest_exit('browser/async.cpp', args=['-O' + str(opts), '-g2'] + args)
33273334

33283335
def test_asyncify_tricky_function_sig(self):
33293336
self.btest('browser/test_asyncify_tricky_function_sig.cpp', '85', args=['-sASYNCIFY_ONLY=[foo(char.const*?.int#),foo2(),main,__original_main]', '-sASYNCIFY'])

0 commit comments

Comments
 (0)