diff --git a/test/test_browser.py b/test/test_browser.py index 56f75e65f8c3c..5230f5b9b26b9 100644 --- a/test/test_browser.py +++ b/test/test_browser.py @@ -203,6 +203,7 @@ def webgpu_disabled(): requires_webgpu = unittest.skipIf(webgpu_disabled(), "This test requires WebGPU to be available") requires_sound_hardware = skipExecIf(os.getenv('EMTEST_LACKS_SOUND_HARDWARE'), 'This test requires sound hardware') requires_offscreen_canvas = skipExecIf(os.getenv('EMTEST_LACKS_OFFSCREEN_CANVAS'), 'This test requires a browser with OffscreenCanvas') +requires_es6_workers = skipExecIf(os.getenv('EMTEST_LACKS_ES6_WORKERS'), 'This test requires a browser with ES6 Module Workers support') class browser(BrowserCore): @@ -4731,6 +4732,7 @@ def test_pthread_reltime(self): 'blob_es6': (True, True), 'url_es6': (True, False), }) + @requires_es6_workers def test_mainScriptUrlOrBlob(self, es6, use_blob): # TODO: enable this with wasm, currently pthreads/atomics have limitations self.set_setting('EXIT_RUNTIME') @@ -5080,6 +5082,7 @@ def test_system(self): def test_wasm_worker_hello(self): self.btest_exit('wasm_worker/hello_wasm_worker.c', cflags=['-sWASM_WORKERS', '-sENVIRONMENT=web']) + @requires_es6_workers def test_wasm_worker_hello_export_es6(self): self.btest_exit('wasm_worker/hello_wasm_worker.c', cflags=['-sWASM_WORKERS', '-sENVIRONMENT=web', '-sEXPORT_ES6']) @@ -5473,6 +5476,7 @@ def test_full_js_library_strict(self): 'audio_params_disabled': (['-sAUDIO_WORKLET_SUPPORT_AUDIO_PARAMS=0'],), }) @requires_sound_hardware + @requires_es6_workers def test_audio_worklet(self, args): self.btest_exit('webaudio/audioworklet.c', cflags=['-sAUDIO_WORKLET', '-sWASM_WORKERS', '-DTEST_AND_EXIT'] + args)