Skip to content

Commit

Permalink
Add test diff created by kripken per request
Browse files Browse the repository at this point in the history
  • Loading branch information
dashodanger committed Jan 11, 2025
1 parent 6b19c35 commit 2d35667
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,16 @@ def test_preload_caching(self, extra_size):
self.skipTest('chrome bug')
create_file('somefile.txt', '''load me right before running the code please''' + ('_' * extra_size))
print('size:', os.path.getsize('somefile.txt'))
self.compile_btest('main.c', ['--use-preload-cache', '--js-library', 'test.js', '--preload-file', 'somefile.txt', '-o', 'page.html', '-sALLOW_MEMORY_GROWTH'], reporting=Reporting.JS_ONLY)
args = ['--use-preload-cache', '--js-library', 'test.js', '--preload-file', 'somefile.txt', '-o', 'page.html', '-sALLOW_MEMORY_GROWTH']
self.compile_btest('main.c', args, reporting=Reporting.JS_ONLY)
self.run_browser('page.html', '/report_result?exit:0')
self.run_browser('page.html', '/report_result?exit:1')

# test with ENVIRONMENT=web, to check for problems with node.js support
# (see #23059)
self.compile_btest('main.c', args + ['-sENVIRONMENT=web'], reporting=Reporting.JS_ONLY)
self.run_browser('page.html', '/report_result?exit:0')

def test_preload_caching_indexeddb_name(self):
self.set_setting('EXIT_RUNTIME')
create_file('somefile.txt', '''load me right before running the code please''')
Expand Down

0 comments on commit 2d35667

Please sign in to comment.