@@ -1584,7 +1584,11 @@ def test_egl_width_height(self, args):
15841584 def test_egl_createcontext_error (self ):
15851585 self .btest_exit ('test_egl_createcontext_error.c' , args = ['-lEGL' , '-lGL' ])
15861586
1587- def test_worker (self ):
1587+ @parameterized ({
1588+ '' : ([False ],),
1589+ 'preload' : ([True ],),
1590+ })
1591+ def test_hello_world_worker (self , file_data ):
15881592 # Test running in a web worker
15891593 create_file ('file.dat' , 'data for worker' )
15901594 create_file ('main.html' , '''
@@ -1602,13 +1606,12 @@ def test_worker(self):
16021606 </html>
16031607 ''' % self .port )
16041608
1605- for file_data in (1 , 0 ):
1606- cmd = [EMCC , test_file ('hello_world_worker.cpp' ), '-o' , 'worker.js' ] + self .get_emcc_args ()
1607- if file_data :
1608- cmd += ['--preload-file' , 'file.dat' ]
1609- self .run_process (cmd )
1610- self .assertExists ('worker.js' )
1611- self .run_browser ('main.html' , '/report_result?hello from worker, and :' + ('data for w' if file_data else '' ) + ':' )
1609+ cmd = [EMCC , test_file ('hello_world_worker.c' ), '-o' , 'worker.js' ] + self .get_emcc_args ()
1610+ if file_data :
1611+ cmd += ['--preload-file' , 'file.dat' ]
1612+ self .run_process (cmd )
1613+ self .assertExists ('worker.js' )
1614+ self .run_browser ('main.html' , '/report_result?hello from worker, and :' + ('data for w' if file_data else '' ) + ':' )
16121615
16131616 # code should run standalone too
16141617 # To great memories >4gb we need the canary version of node
0 commit comments