Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5671,9 +5671,11 @@ def test_rollup(self):
'es6': (['-sEXPORT_ES6', '--extern-post-js', test_file('modularize_post_js.js')], 9999),
})
def test_cross_origin(self, args, port):
# Verfies that the emscripten-generted JS and Wasm can be hosted on a different origin.
# This test create a second HTTP server running a different port that servers files from `subdir`.
# The main html is the servers from the normal 8888 server while the JS and Wasm are hosted
if '-sEXPORT_ES6' in args and browser_should_skip_feature('EMTEST_LACKS_ES6_WORKERS', Feature.WORKER_ES6_MODULES):
self.skipTest('This test requires a browser with ES6 Module Workers support')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should have a method version of @requires_es6_workers decorator. But this LGTM for now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the awkwardness of decorators not combining well with these parameterized modes repeats in many tests. That would be a bit of a cleanup refactor to figure out how to create a simple pattern that would work well in both.

# Verifies that the emscripten-generated JS and Wasm can be hosted on a different origin.
# This test creates a second HTTP server running on a different port that serves files from `subdir`.
# The main html is served from the normal port 8888 server while the JS and Wasm are hosted
# on the port specified above.
os.mkdir('subdir')
create_file('subdir/foo.txt', 'hello')
Expand Down